Skip Menu |

This queue is for tickets about the POSIX-strptime CPAN distribution.

Report information
The Basics
Id: 25534
Status: resolved
Worked: 10 min
Priority: 0/
Queue: POSIX-strptime

People
Owner: Nobody in particular
Requestors: stanis.trendelenburg [...] pluto.uni-freiburg.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Feature request: Export strptime() on request
Date: Mon, 19 Mar 2007 03:10:39 +0100
To: bug-POSIX-strptime [...] rt.cpan.org
From: Stanis Trendelenburg <stanis.trendelenburg [...] pluto.uni-freiburg.de>
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.
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.
Subject: Re: [rt.cpan.org #25534] Resolved: Feature request: Export strptime() on request
Date: Mon, 19 Mar 2007 13:21:21 +0100
To: bug-POSIX-strptime [...] rt.cpan.org
From: Stanis Trendelenburg <stanis.trendelenburg [...] pluto.uni-freiburg.de>
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 :)
--- strptime.pm.orig 2007-03-19 08:39:52.000000000 +0100 +++ strptime.pm 2007-03-19 13:09:24.000000000 +0100 @@ -10,9 +10,12 @@ require Exporter; @ISA = qw(Exporter); +@EXPORT_OK = qw(strptime); XSLoader::load 'POSIX::strptime', $VERSION; +*POSIX::strptime::strptime = \&POSIX::strptime; + # Preloaded methods go here. 1;
From: GOZER [...] cpan.org
I was a little too eager releasing 0.07, sorry about that. Look for POSIX-strptime 0.08 on a CPAN mirror close to home.
Closing old, fixed bug