[SCM] Debian packaging of libpetal-perl branch, master, updated. debian/2.19-2-5-gf18b8c7
gregor herrmann
gregoa at debian.org
Sun Aug 28 18:12:41 UTC 2011
The following commit has been merged in the master branch:
commit afe3d7ffbd7f08c99e2bc5a793e49b84d3a1e33d
Author: gregor herrmann <gregoa at debian.org>
Date: Sun Aug 28 20:11:28 2011 +0200
Remove no-Safe.patch and no-UNIVERSAL-import.patch, applied upstream.
diff --git a/debian/patches/no-Safe.patch b/debian/patches/no-Safe.patch
deleted file mode 100644
index cab248c..0000000
--- a/debian/patches/no-Safe.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Description: drop usage of Safe in taint mode
- Safe 2.27 (included in Perl 5.12.1) adds a wrapper around code refs returned by reval. This causes severe problems in Petal internals.
-Bug: https://rt.cpan.org/Public/Bug/Display.html?id=57787
-Bug-Debian: http://bugs.debian.org/582805
-Author: Damyan Ivanov <dmn at debian.org>
-
---- a/lib/Petal.pm
-+++ b/lib/Petal.pm
-@@ -15,7 +15,6 @@ use Petal::Functions;
- use Petal::Entities;
- use File::Spec;
- use Carp;
--use Safe;
- use Data::Dumper;
- use Scalar::Util;
- use strict;
-@@ -647,25 +646,9 @@ sub _code_memory_cached
- my $code_perl = $self->_code_disk_cached;
- my $VAR1 = undef;
-
-- if ($TAINT)
-- {
-- # important line, don't remove
-- ($code_perl) = $code_perl =~ m/^(.+)$/s;
-- die "\$code_perl is empty after untainting!" unless defined $code_perl && $code_perl;
-- my $cpt = Safe->new ("Petal::CPT");
-- $cpt->permit ('entereval');
-- $cpt->permit ('leaveeval');
-- $cpt->permit ('require');
-- $code = $cpt->reval($code_perl);
-- confess ("Error in reval:\n" . $@ . "\n" . $self->_code_with_line_numbers) if $@;
-- warn "\$code is empty after reval.\n" . Dumper($code, $Petal::CPT::VAR1, length($code_perl)) unless $code;
-- }
-- else
-- {
-- eval "$code_perl";
-- confess ($@ . "\n" . $self->_code_with_line_numbers) if $@;
-- $code = $VAR1;
-- }
-+ eval "$code_perl";
-+ confess ($@ . "\n" . $self->_code_with_line_numbers) if $@;
-+ $code = $VAR1;
-
- Petal::Cache::Memory->set ($self->_file_path_with_macro, $code, $self->language) if (defined $MEMORY_CACHE and $MEMORY_CACHE);
- }
diff --git a/debian/patches/no-UNIVERSAL-import.patch b/debian/patches/no-UNIVERSAL-import.patch
deleted file mode 100644
index 0abf738..0000000
--- a/debian/patches/no-UNIVERSAL-import.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Description: UNIVERSAL::isa and ::import are deprecated with perl 5.12
- Replace their usafe with $class->isa and Scalar::Util::reftype
-Author: Stefan Seifert (nine_AT_detonation_DOT_org)
-Bug: https://rt.cpan.org/Public/Bug/Display.html?id=57787
-Bug-Debian: http://bugs.debian.org/582805
-
---- a/lib/Petal/Hash/Var.pm
-+++ b/lib/Petal/Hash/Var.pm
-@@ -11,8 +11,7 @@
- use warnings;
-
- use Carp;
--use UNIVERSAL qw( isa );
--use Scalar::Util qw( blessed );
-+use Scalar::Util qw( blessed reftype );
-
-
- our $STRING_RE_DOUBLE = qr/(?<!\\)\".*?(?<!\\)\"/;
-@@ -78,7 +77,7 @@
- if (blessed $current)
- {
- ACCESS_OBJECT:
-- goto ACCESS_HASH if (isa ($current, 'Petal::Hash'));
-+ goto ACCESS_HASH if ($current->isa('Petal::Hash'));
-
- if ($current->can ($next) or $current->can ('AUTOLOAD'))
- {
-@@ -87,23 +86,23 @@
- }
- else
- {
-- goto ACCESS_HASH if (isa ($current, 'HASH'));
-- goto ACCESS_ARRAY if (isa ($current, 'ARRAY'));
-+ goto ACCESS_HASH if ((reftype($current) or '') eq 'HASH');
-+ goto ACCESS_ARRAY if ((reftype($current) or '') eq 'ARRAY');
- confess "Cannot invoke '$next' on '" . ref($current) .
- "' object at '$current_path' - no such method (near $argument)";
- }
- }
-- elsif (isa ($current, 'HASH'))
-+ elsif (ref($current) eq 'HASH')
- {
- ACCESS_HASH:
-- unless (isa $current->{$next}, 'CODE')
-+ unless (ref($current->{$next}) eq 'CODE')
- {
- confess "Cannot access hash at '$current_path' with parameters (near $argument)"
- if ($has_args and not $has_path_tokens);
- }
- $current = $current->{$next};
- }
-- elsif (isa ($current, 'ARRAY'))
-+ elsif (ref($current) eq 'ARRAY')
- {
- ACCESS_ARRAY:
- # it might be an array, then the key has to be numerical...
-@@ -130,13 +129,13 @@
- return '';
- }
-
-- $current = (isa ($current, 'CODE')) ? $current->(@args) : $current;
-+ $current = (ref($current) eq 'CODE') ? $current->(@args) : $current;
- $current_path .= "/$next";
- }
-
- # return '' unless (defined $current);
- # $current = "$current" if (defined $current);
-- return $$current if isa($current, 'SCALAR');
-+ return $$current if ref($current) eq 'SCALAR';
- return $current;
- }
-
diff --git a/debian/patches/series b/debian/patches/series
index eab7c6c..38edaa7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1 @@
-no-UNIVERSAL-import.patch
-no-Safe.patch
spelling-errors.patch
--
Debian packaging of libpetal-perl
More information about the Pkg-perl-cvs-commits
mailing list