[libapache-admin-config-perl] 05/11: Switch to source format "3.0 (quilt)"
Alex Muntada
alexm at debian.org
Fri Sep 8 23:59:38 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 01d37c79c0a92b47674e58c8d8d5f97b235eab94
Author: Alex Muntada <alexm at debian.org>
Date: Fri Sep 8 19:05:14 2017 +0200
Switch to source format "3.0 (quilt)"
---
debian/patches/bug-467122.patch | 83 +++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/source/format | 1 +
lib/Apache/Admin/Config.pm | 55 ++++++++++++++++++---------
4 files changed, 123 insertions(+), 17 deletions(-)
diff --git a/debian/patches/bug-467122.patch b/debian/patches/bug-467122.patch
new file mode 100644
index 0000000..491cf66
--- /dev/null
+++ b/debian/patches/bug-467122.patch
@@ -0,0 +1,83 @@
+Description: Apply patch by Niko Tyni to fix FTBFS with perl 5.10
+Author: Niko Tyni <ntyni at debian.org>
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=467122;filename=467122.patch;msg=10
+Bug-Debian: https://bugs.debian.org/467122
+Forwarded: no
+Reviewed-By: Frank Lichtenheld <djpig at debian.org>
+Last-Update: 2008-07-09
+
+--- libapache-admin-config-perl-0.94.orig/lib/Apache/Admin/Config.pm
++++ libapache-admin-config-perl-0.94/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);
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e926418
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+bug-467122.patch
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/lib/Apache/Admin/Config.pm b/lib/Apache/Admin/Config.pm
index 237b7a5..06c3738 100644
--- a/lib/Apache/Admin/Config.pm
+++ b/lib/Apache/Admin/Config.pm
@@ -227,8 +227,7 @@ package Apache::Admin::Config::Tree;
use strict;
use Carp;
use FileHandle;
-use overload cmp => \&cmp_string, '<=>' => \&spaceship_number,
- nomethod => \&to_string;
+use overload nomethod => \&to_string;
sub new
@@ -1229,25 +1228,47 @@ 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(!defined $self->{value})
+ 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})
{
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