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

My thought was just: perl ConfigFile.pm where, when run as an executable, it runs the validate() routine.

I am just looking for simple syntax for my user which eliminates a trivial driver program. This is probably not that big of a deal. And it could also be that this confuses the issue even more and is a bad idea! It could wind up being that I need to build a GUI to assist generation of this config file.

Replies are listed 'Best First'.
Re^3: Difference between executing and "using" a .pm file
by ikegami (Patriarch) on Apr 01, 2021 at 06:25 UTC

    Yes, and to that I said: There are a couple of problems with executing a module as a modulino. And it's totally unnecessary. Load the module properly.

    Seeking work! You can reach me at ikegami@adaelis.com

      Thanks! I appreciate your comments! I am planning for a major new code release and this is just one small part. This is a time for me to reexamine previous decisions and designs. After 2+ years of negotiations, I finally convinced one website to give an efficient XML I/F with the features that I need and which also fits into this guy's plan for his website. This sort of thing sounds "easy", but in practice, it is not. I won't get what I "wanted", but I will get what I "need". And that will be enough.