Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Aliasing Module->method

by stevieb (Canon)
on Feb 06, 2016 at 19:23 UTC ( #1154577=note: print w/replies, xml ) Need Help??


in reply to Aliasing Module->method

First off, the confusion later down the road by using my code below isn't remotely close to being worth saving a few keystrokes, but to answer your question, you can use a typeglob, and wrap the call within an anonymous sub. Note how I pass in the parameters (@_) through the anonysub and directly into the original call:

use warnings; use strict; use Time::Piece; *st = sub { Time::Piece->strptime(@_) }; st("Sunday 3rd Nov, 1943", "%A %drd %b, %Y",);

Replies are listed 'Best First'.
Re^2: Aliasing Module->method
by gerases (Sexton) on Feb 06, 2016 at 23:10 UTC
    Ahhh... Cool!! Thank you for such a quick response.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2022-01-18 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (53 votes). Check out past polls.

    Notices?