Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: RFC: new.pm - a perl -e use/new shortener (default variable)

by Dallaylaen (Hermit)
on Dec 24, 2016 at 20:59 UTC ( #1178474=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: new.pm - a perl -e use/new shortener (default variable)
in thread RFC: new.pm - a perl -e use/new shortener

A ">" would clash with shell metacharacters and require escaping. I'm thinking of something like
x=My::Class:Name.method arg arg ....
instead. Both x and method default to "new" if omitted, which is at least consistent with the module name.
  • Comment on Re^2: RFC: new.pm - a perl -e use/new shortener (default variable)
  • Download Code

Replies are listed 'Best First'.
Re^3: RFC: new.pm - a perl -e use/new shortener (default variable)
by LanX (Bishop) on Dec 25, 2016 at 14:34 UTC
    Hi

    > x=My::Class:Name.method arg arg

    I suppose you meant x=My::Class::Name.method arg arg with double colon after Class :)

    But apart of this, it looks good for me!

    I tested the call with -M and -m with a fake module which just print the args of the import() , using my oldest available perl(brew) version.

    $ perl -MNew=X=Y::Y::Y.meth,1,2,3 -e'print "$]\n"' New , X=Y::Y::Y.meth , 1 , 2 , 3 5.006002 $ perl -mNew=X=Y::Y::Y.meth,1,2,3 -e'print "$]\n"' New , X=Y::Y::Y.meth , 1 , 2 , 3 5.006002

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1178474]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2018-07-23 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (459 votes). Check out past polls.

    Notices?