X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FBigIntCompat.pm;h=ae4d77f80a8b662a31b3a70b8b4e5cb51b6beae9;hb=c88ee0799dbba0d855be48a5c148c4586400b142;hp=485657b4f9a9baba4b925e94a07950018bae2022;hpb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;p=debian%2Famanda diff --git a/perl/Amanda/BigIntCompat.pm b/perl/Amanda/BigIntCompat.pm index 485657b..ae4d77f 100644 --- a/perl/Amanda/BigIntCompat.pm +++ b/perl/Amanda/BigIntCompat.pm @@ -1,20 +1,20 @@ -# Copyright (c) 2005-2008 Zmanda, Inc. All Rights Reserved. -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License version 2.1 as -# published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, but +# Copyright (c) 2008,2009 Zmanda, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -# License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -# -# Contact information: Zmanda Inc., 465 S Mathlida Ave, Suite 300 -# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300 +# Sunnyvale, CA 94085, USA, or: http://www.zmanda.com package Amanda::BigIntCompat; @@ -35,14 +35,10 @@ Amanda::BigIntCompat -- make C behave consistently my $bn = Math::BigInt->new(1); print "okay\n" if $bn eq "1"; -=head1 API STATUS - -Stable - =head1 INTERFACE This module will modify C to hide inconsistent behaviors across -Perl versions. Spefically, it handles the following. +Perl versions. Specifically, it handles the following. =over @@ -56,7 +52,10 @@ stringify positive numbers with a leading C<+> (e.g. C<+1> instead of C<1>). =cut my $test_num = Math::BigInt->new(1); + our $stringify = overload::Method($test_num, '""'); +# convince older perls that $stringify really is used +$stringify = $stringify; if ($test_num =~ /^\+/) { eval <<'EVAL';