Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: Difference between executing and "using" a .pm file

by Marshall (Canon)
on Mar 30, 2021 at 20:09 UTC ( [id://11130609]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Difference between executing and "using" a .pm file
in thread Difference between executing and "using" a .pm file

Thanks! I shall keep that in mind. The purpose of this validate() program is not to test my module. It is to help the user develop a consistent and accurate configuration file. Over the last 5 years of development, the syntax of this config file has become more complex. It winds up being possible to configure things that my SW doesn't consider an error, but nevertheless will could surprise the user. This is to make sure "that you've told the program to do what you want". So it spews out all sorts of explanations intended for a human to read. Updating this config file is serious business and is only typically done once per year.

Replies are listed 'Best First'.
Re^5: Difference between executing and "using" a .pm file
by LanX (Saint) on Mar 30, 2021 at 21:59 UTC
    > It is to help the user develop a consistent and accurate configuration file.

    Hmm ... I'm not sure I'd use a Modulino for this.

    Something like

    perl -mMODULE=foo

    will use Module and call Module->import("foo") and you are free to let the importer do whatever you want, and you can have a variety of functions you can call.

    see perlrun -[mM][-]module=arg... for details.

    Of course calling a Modulino perl path/MODULE.pm foo can also validate the command-line options like foo here, but in this case your client needs to know the path to the installation.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found