Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Using guards for script execution? (no modulinos , an evil gimmick )

by Anonymous Monk
on Mar 01, 2017 at 01:02 UTC ( [id://1183221]=note: print w/replies, xml ) Need Help??


in reply to Re: Using guards for script execution?
in thread Using guards for script execution?

no, don't use modulinos, they offer no benefits in perl, they're actually an evil gimmick

scripts shouldn't pretend to be modules, scripts should use modules

Deciding what sub/method to run based on how the "module" (scriptfile) is loaded , is about as pointless and dumb as it gets

Make it into a real module, then change the script to use it

use App::NowModule; App::NowModule::Main(@ARGV);

modulino and perldoc, Re: modulino and $VERSION (all code in module , script as module )

  • Comment on Re^2: Using guards for script execution? (no modulinos , an evil gimmick )
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1183221]
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 2024-06-18 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.