Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask


by duelafn (Priest)
on Mar 03, 2006 at 17:55 UTC ( #534308=note: print w/ replies, xml ) Need Help??

in reply to

Like many, I use a module (docs, Dean::Util), however it also has the ability to remove dependency on itself from scripts and other modules. For example:

# In some script/module use Dean::Util qw/map_pair nsign min_max/; # other code ...

Then later to send the script to other machines:

perl -MDean::Util -we insert_Dean_Util_functions

This replaces the use Dean::Util line with the code for the subs requested (and optionally documentation). The insert_Dean_Util_functions function is a bit of a kludge, but it works.

This gives the benefits of using a module (old code uses improved functions when I get a chance to fix up code in the module) as well as the benefits of copy-paste (can transfer scripts to other machines without installing my module).

Good Day,

Comment on Re:
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2015-11-29 10:39 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls