in reply to Re^3: How to build system calls using '=>'
in thread How to build system calls using '=>'
mkpath doesn't require an external binaryEeeck! Scary! An external binary! Code reuse! Bad! Bad! Bad!
Perl is a glue language. There's nothing wrong with using a code someone else wrote. Whether that's "an external binary" (what's an "internal binary"?) or a module.
doesn't create another process to do its jobYes, and? Are you worried about performance? Sure, creating another process takes a few microseconds. But we're about the muck around in the filesystem anyway. And compiling a piece of Perl isn't exactly resource free either.
so they don't *have* to remember.Yeah, but then they have to look it up. And that takes valuable programmer time.
Shelling out to 'mkdir -p $path' is OS dependent as wellI never claimed it wasn't.
The 17 line piece of code is an _example_.Of course. But:
system 'mkdir', '-p', @dirs and die;is just one line. Even if you mimic it using 5 lines, it's still 400% more lines. Remember: programmer time is expensive!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to build system calls using '=>'
by Anonymous Monk on Apr 17, 2009 at 16:34 UTC |