Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by tye (Sage)
on Apr 22, 2008 at 20:20 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-23 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found