Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Miscellaneous.pm?

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


in reply to Miscellaneous.pm?

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 the_script.pl

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,
    Dean

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2025-06-19 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.