Time::Piece boldly redefines gmtime and localtime. If these are already redefined, Time::Piece throws fugly warnings: --cut-- Subroutine Class::DBI::mysql::localtime redefined at /usr/local/lib/perl5/site_perl/5.8.8/mach/Time/Piece.pm line 124. Subroutine Class::DBI::mysql::gmtime redefined at /usr/local/lib/perl5/site_perl/5.8.8/mach/Time/Piece.pm line 124. --cut-- This patch has also been sent upstream: http://rt.cpan.org//Ticket/Display.html?id=18358 Added file(s): - files/patch-Piece.pm Port maintainer (tobez@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.63
Responsible Changed From-To: freebsd-ports-bugs->tobez Over to maintainer
On Sat, Mar 25, 2006 at 03:16:09PM +0100, Lars Thegler wrote: > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ files/patch-Piece.pm 25 Mar 2006 14:11:30 -0000 > @@ -0,0 +1,10 @@ > +--- ./Piece.pm.orig Sun Feb 26 20:49:20 2006 > ++++ ./Piece.pm Sun Feb 26 20:49:50 2006 > +@@ -121,6 +121,7 @@ > + for my $method (@methods) { > + if (exists $_special_exports{$method}) { > + no strict 'refs'; > ++ no warnings 'redefine'; > + *{$to . "::$method"} = $_special_exports{$method}->($class); > + } else { > + $class->SUPER::export($to, $method); While we do not go to extreme lengths to support base system perl on 4.X, it is still unfortunate that this patch will break the port there (which otherwise works fine with 5.005_03). Maybe this version would be preferable? --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-Piece.pm 25 Mar 2006 14:11:30 -0000 @@ -0,0 +1,10 @@ +--- ./Piece.pm.orig Sun Feb 26 20:49:20 2006 ++++ ./Piece.pm Sun Feb 26 20:49:50 2006 +@@ -121,6 +121,7 @@ + for my $method (@methods) { + if (exists $_special_exports{$method}) { + no strict 'refs'; ++ local $^W; + *{$to . "::$method"} = $_special_exports{$method}->($class); + } else { + $class->SUPER::export($to, $method); \Anton. -- An undefined problem has an infinite number of solutions. -- Robert A. Humphrey
Anton Berezin wrote: > Maybe this version would be preferable? > ++ local $^W; Indeed. /Lars
State Changed From-To: open->closed The fix has been committed. Thank you for your submission.