Hi,
It would be great if you could make POSIX::strptime export the
strptime() subroutine on request. Being able to say just strptime()
instead of POSIX::strptime() saves much typing.
Mon Mar 19 02:42:29 2007gozer [...] cpan.org - Correspondence added10 min
On Mon Mar 19 01:28:21 2007, stanis.trendelenburg@pluto.uni-freiburg.de
wrote:
Show quoted text
> Hi,
> It would be great if you could make POSIX::strptime export the
> strptime() subroutine on request. Being able to say just strptime()
> instead of POSIX::strptime() saves much typing.
Done, look for POSIX-strptime 0.07 on a CPAN mirror close to home.
Mon Mar 19 02:42:31 2007The RT System itself - Status changed from 'new' to 'open'
Mon Mar 19 02:42:32 2007gozer [...] cpan.org - Status changed from 'open' to 'resolved'
Mon Mar 19 08:21:44 2007stanis.trendelenburg [...] pluto.uni-freiburg.de - Correspondence added
Subject:
Re: [rt.cpan.org #25534] Resolved: Feature request: Export strptime() on request
Thanks for the quick reply!
I've installed version 0.07, but I get
"strptime" is not exported by the POSIX::strptime module
when saying
use POSIX::strptime qw(strptime);
strptime('2007', '%Y');
Setting
@EXPORT_OK = qw(strptime)
in strptime.pm doesn't work eihter, because it then looks for
POSIX::strptime::strptime(), wich does not exist.
I've attached a patch that makes it work by assigning the subroutine to
the *POSIX::strptime::strptime symbol directly, and exporting that.
I don't know if it is the cleanest solution, but it works for me :)