http://www.perlmonks.org?node_id=1154577


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.