[libapache-admin-config-perl] 02/02: Import Debian changes 0.94-1.1

Alex Muntada alexm at debian.org
Thu Sep 7 19:12:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

alexm pushed a commit to branch master
in repository libapache-admin-config-perl.

commit cd6ad6b0e16fa8f4bfd8c40cf628318097ffa3db
Author: Frank Lichtenheld <djpig at debian.org>
Date:   Wed Jul 9 20:56:04 2008 +0200

    Import Debian changes 0.94-1.1
    
    libapache-admin-config-perl (0.94-1.1) unstable; urgency=low
    
      * Non-maintainer upload.
      * Apply patch by Niko Tyni to fix FTBFS with perl 5.10
        (Closes: #467122)
---
 debian/changelog           |  8 +++++++
 lib/Apache/Admin/Config.pm | 55 ++++++++++++++--------------------------------
 2 files changed, 25 insertions(+), 38 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9285eca..e02fcb3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libapache-admin-config-perl (0.94-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Apply patch by Niko Tyni to fix FTBFS with perl 5.10
+    (Closes: #467122)
+
+ -- Frank Lichtenheld <djpig at debian.org>  Wed, 09 Jul 2008 20:56:04 +0200
+
 libapache-admin-config-perl (0.94-1) unstable; urgency=low
 
   * Initial release (Closes: #382381)
diff --git a/lib/Apache/Admin/Config.pm b/lib/Apache/Admin/Config.pm
index 06c3738..237b7a5 100644
--- a/lib/Apache/Admin/Config.pm
+++ b/lib/Apache/Admin/Config.pm
@@ -227,7 +227,8 @@ package Apache::Admin::Config::Tree;
 use strict;
 use Carp;
 use FileHandle;
-use overload nomethod => \&to_string;
+use overload cmp => \&cmp_string, '<=>' => \&spaceship_number,
+             nomethod => \&to_string;
 
 
 sub new
@@ -1228,47 +1229,25 @@ sub isin
     }
 }
 
+sub cmp_string
+{
+    my ($self, $other, $inv) = @_;
+    return $inv ? ($other cmp $self->{value}) :
+                  ($self->{value} cmp $other);
+}
+
+sub spaceship_number
+{
+    my ($self, $other, $inv) = @_;
+    return $inv ? ($other <=> $self->{value}) :
+                  ($self->{value} <=> $other);
+}
+
 sub to_string
 {
     my($self, $other, $inv, $meth) = @_;
 
-    if($meth eq 'eq')
-    {
-        if($^W and (!defined $other or !defined $self->{value}))
-        {
-            carp "Use of uninitialized value in string eq";
-        }
-        local $^W;
-        return($other ne $self->{value});
-    }
-    elsif($meth eq 'ne')
-    {
-        if($^W and (!defined $other or !defined $self->{value}))
-        {
-            carp "Use of uninitialized value in string ne";
-        }
-        local $^W;
-        return($other ne $self->{value});
-    }
-    elsif($meth eq '==')
-    {
-        if($^W and (!defined $other or !defined $self->{value}))
-        {
-            carp "Use of uninitialized value in numeric eq (==)";
-        }
-        local $^W;
-        return($other != $self->{value});
-    }
-    elsif($meth eq '!=')
-    {
-        if($^W and (!defined $other or !defined $self->{value}))
-        {
-            carp "Use of uninitialized value in numeric ne (!=)";
-        }
-        local $^W;
-        return($other != $self->{value});
-    }
-    elsif(!defined $self->{value})
+    if(!defined $self->{value})
     {
         return overload::StrVal($self);
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libapache-admin-config-perl.git



More information about the Pkg-perl-cvs-commits mailing list