Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^4: Installing modules to a private module directory (cp)

by tye (Sage)
on Apr 22, 2008 at 20:20 UTC ( #682266=note: print w/replies, xml ) Need Help??

in reply to Re^3: Installing modules to a private module directory (cases)
in thread Installing modules to a private module directory

I was going to note that it would be trivial to replace the less-portable "cp -pr" with a tiny Perl script but then I was disappointed when my 20 seconds spent searching for the details of how to do that with "core" Perl modules didn't actually turn up a solution. I jumped to File::Path then quickly realized I meant to look at File::Copy but then I didn't find a "copy directory tree" function in either (but, at only 20 seconds, I certainly could have missed it).

So this node is my taunt to the community to point out where this functionality already is (hopefully in "core") or to goad somebody into implementing it (hopefully as a patch to a "core" module).

Although I suspect that there are modules that are not perfectly served by the "cp -pr" approach, such modules are likely the tiny minority (modules that have done the hard work of figuring out how to goad things like ExtUtils::MakeMaker into installing unusual items such as executable scripts or config files or something). Given that even the shiny new features of the new1 Module::Build are still reported to have similar problems to the ones Dominus rightly complains about (insertion of annoying subdirectories) and perhaps worse (only sometimes inserting those subdirectories), this "better solution" seems worth "implementing".

1 No, the ommission of the "shiny" adjective was not accidental. q-:

- tye        

  • Comment on Re^4: Installing modules to a private module directory (cp)

Replies are listed 'Best First'.
Re^5: Installing modules to a private module directory (cp)
by Corion (Patriarch) on Apr 22, 2008 at 20:24 UTC

    Seems as if (at least current versions of) ExtUtils::Install do that, according to the synopsis:

    use ExtUtils::Install; install({ 'blib/lib' => 'some/install/dir' } );

    seems to be deprecated but basically cp -rp

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://682266]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2022-01-20 04:30 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.