http://qs321.pair.com?node_id=1185377


in reply to Re^2: Modules as executable scripts?
in thread Modules as executable scripts?

It's true about "use", but "require" doesn't. And that could be the ticket for making modulinos less weird on the command line.

Replies are listed 'Best First'.
Re^4: Modules as executable scripts?
by RonW (Parson) on Mar 21, 2017 at 22:07 UTC

    True, but then it's "weird" to use from a program or other module:

    BEGIN { require "Modulino.pl"; Modulino::import; }

    instead of the usual:

    use Modulino;

    I think it's better to put up with the weirdness in the modulino than forcing weirdness into programs and other modules that try to use the modulino.

Re^4: Modules as executable scripts? (say no modulinos, an evil gimmick)
by Anonymous Monk on Mar 21, 2017 at 22:56 UTC

    It's true about "use", but "require" doesn't. And that could be the ticket for making modulinos less weird on the command line

    Hi

    modulinos are golf, which is a game, a gimmick, and not a feature to be used for work,

    so say no modulinos , an evil gimmick )

    If a user can be bothered to create a  symlink. I.e., /bin/something -> path_to_pm

    Then the user can be bothered to create

    cat>/bin/something use TheModule; TheModule::BinSomething( @ARGV );

    Its literally no effort at all to accomplish, esp if bin/something is created by the module installation software

    The only thing modulinos can accomplish is to substitute 1 symlink for 1 regular file -- what a ridiculous goal to write extra code for