Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Where to put self-made loop logic (separate module)?

by CountZero (Bishop)
on Dec 30, 2012 at 09:14 UTC ( #1010904=note: print w/ replies, xml ) Need Help??


in reply to Where to put self-made loop logic (separate module)?

Something like this?

package My::Cunning::Module; use Modern::Perl; use Exporter qw/import/; our @EXPORT_OK = qw/looper/; sub looper { #admire my cunningly crafted loop logic function ... } 1;
And you then call your function as follows:
use Modern::Perl; use My::Cunning::Module qw/looper/; # somewhere in your program looper($data) or die 'It did not work';

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re: Where to put self-made loop logic (separate module)?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-09-30 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (385 votes), past polls