Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Using guards for script execution?

by hakonhagland (Scribe)
on Feb 28, 2017 at 23:37 UTC ( #1183213=note: print w/replies, xml ) Need Help??


in reply to Using guards for script execution?

See also Rescue legacy code with modulinos

Replies are listed 'Best First'.
Re^2: Using guards for script execution? (no modulinos , an evil gimmick )
by Anonymous Monk on Mar 01, 2017 at 01:02 UTC

    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 )

Re^2: Using guards for script execution?
by R0b0t1 (Initiate) on Mar 03, 2017 at 14:57 UTC

    Thank you for the link. That is what I was referring to, and it links to a PerlMonks post I will follow up on. I had been trying to find where the topic had been covered before and that may be it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2023-06-03 20:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (17 votes). Check out past polls.

    Notices?