summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST2
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/Filter-Util-Call/Call.pm27
-rw-r--r--cpan/Filter-Util-Call/Call.xs6
-rw-r--r--cpan/Filter-Util-Call/filter-util.pl8
-rw-r--r--cpan/Filter-Util-Call/t/rt_101033.pm27
-rw-r--r--cpan/Filter-Util-Call/t/rt_101033.t11
-rw-r--r--pod/perldelta.pod4
-rw-r--r--pod/perlfilter.pod30
9 files changed, 92 insertions, 25 deletions
diff --git a/MANIFEST b/MANIFEST
index 3c81860674..3966db4130 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1160,6 +1160,8 @@ cpan/Filter-Util-Call/Call.pm Filter::Util::Call extension module
cpan/Filter-Util-Call/Call.xs Filter::Util::Call extension external subroutines
cpan/Filter-Util-Call/filter-util.pl See if Filter::Util::Call works
cpan/Filter-Util-Call/t/call.t See if Filter::Util::Call works
+cpan/Filter-Util-Call/t/rt_101033.pm
+cpan/Filter-Util-Call/t/rt_101033.t
cpan/Filter-Util-Call/t/rt_54452-rebless.t
cpan/Getopt-Long/lib/Getopt/Long.pm Fetch command options (GetOptions)
cpan/Getopt-Long/t/gol-basic.t See if Getopt::Long works
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 4faee58057..12f5ae584c 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -562,7 +562,7 @@ use File::Glob qw(:case);
},
'Filter::Util::Call' => {
- 'DISTRIBUTION' => 'RURBAN/Filter-1.54.tar.gz',
+ 'DISTRIBUTION' => 'RURBAN/Filter-1.55.tar.gz',
'FILES' => q[cpan/Filter-Util-Call
pod/perlfilter.pod
],
diff --git a/cpan/Filter-Util-Call/Call.pm b/cpan/Filter-Util-Call/Call.pm
index f282a1516d..8b4d41a821 100644
--- a/cpan/Filter-Util-Call/Call.pm
+++ b/cpan/Filter-Util-Call/Call.pm
@@ -1,7 +1,7 @@
-
# Call.pm
#
# Copyright (c) 1995-2011 Paul Marquess. All rights reserved.
+# Copyright (c) 2011-2014 Reini Urban. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
@@ -18,7 +18,7 @@ use vars qw($VERSION @ISA @EXPORT) ;
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw( filter_add filter_del filter_read filter_read_exact) ;
-$VERSION = "1.54" ;
+$VERSION = "1.55" ;
sub filter_read_exact($)
{
@@ -292,6 +292,29 @@ See L<Example 4: Using filter_del> for details.
Internal function which adds the filter, based on the L<filter_add>
argument type.
+=item I<unimport()>
+
+May be used to disable a filter, but is rarely needed. See L<filter_del>.
+
+=back
+
+=head1 LIMITATIONS
+
+See L<perlfilter/LIMITATIONS> for an overview of the general problems
+filtering code in a textual line-level only.
+
+=over
+
+=item __DATA__ is ignored
+
+The content from the __DATA__ block is not filtered.
+This is a serious limitation, e.g. for the L<Switch> module.
+See L<http://search.cpan.org/perldoc?Switch#LIMITATIONS> for more.
+
+=item Max. codesize limited to 32-bit
+
+Currently internal buffer lengths are limited to 32-bit only.
+
=back
=head1 EXAMPLES
diff --git a/cpan/Filter-Util-Call/Call.xs b/cpan/Filter-Util-Call/Call.xs
index fd79c577a2..97280d7755 100644
--- a/cpan/Filter-Util-Call/Call.xs
+++ b/cpan/Filter-Util-Call/Call.xs
@@ -3,7 +3,7 @@
*
* Author : Paul Marquess
* Date : 2014-12-09 02:48:44 rurban
- * Version : 1.54
+ * Version : 1.55
*
* Copyright (c) 1995-2011 Paul Marquess. All rights reserved.
* Copyright (c) 2011-2014 Reini Urban. All rights reserved.
@@ -131,19 +131,15 @@ filter_call(pTHX_ int idx, SV *buf_sv, int maxlen)
DEFSV_set(newSVpv("", 0)) ;
PUSHMARK(sp) ;
-
if (CODE_REF(my_sv)) {
/* if (SvROK(PERL_OBJECT(my_sv)) && SvTYPE(SvRV(PERL_OBJECT(my_sv))) == SVt_PVCV) { */
count = perl_call_sv((SV*)PERL_OBJECT(my_sv), G_SCALAR);
}
else {
XPUSHs((SV*)PERL_OBJECT(my_sv)) ;
-
PUTBACK ;
-
count = perl_call_method("filter", G_SCALAR);
}
-
SPAGAIN ;
if (count != 1)
diff --git a/cpan/Filter-Util-Call/filter-util.pl b/cpan/Filter-Util-Call/filter-util.pl
index 1bc3bfbd93..44e8b1efdd 100644
--- a/cpan/Filter-Util-Call/filter-util.pl
+++ b/cpan/Filter-Util-Call/filter-util.pl
@@ -9,8 +9,8 @@ sub readFile
my ($filename) = @_ ;
my ($string) = '' ;
- open (F, "<$filename")
- or die "Cannot open $filename: $!\n" ;
+ open (F, "<", $filename)
+ or die "Cannot read $filename: $!\n" ;
while (<F>)
{ $string .= $_ }
close F ;
@@ -20,8 +20,8 @@ sub readFile
sub writeFile
{
my($filename, @strings) = @_ ;
- open (F, ">$filename")
- or die "Cannot open $filename: $!\n" ;
+ open (F, ">", $filename)
+ or die "Cannot write $filename: $!\n" ;
binmode(F) if $filename =~ /bin$/i;
foreach (@strings)
{ print F }
diff --git a/cpan/Filter-Util-Call/t/rt_101033.pm b/cpan/Filter-Util-Call/t/rt_101033.pm
new file mode 100644
index 0000000000..526a97cea1
--- /dev/null
+++ b/cpan/Filter-Util-Call/t/rt_101033.pm
@@ -0,0 +1,27 @@
+package rt_101033;
+
+use strict;
+use Filter::Util::Call;
+
+sub import
+{
+ filter_add({});
+ 1;
+}
+
+sub unimport
+{
+ filter_del()
+}
+
+sub filter
+{
+ my($self) = @_ ;
+ my $status = 1;
+ $status = filter_read(1_000_000);
+ #print "code: !$_!\n\n";
+ return $status;
+}
+
+1;
+
diff --git a/cpan/Filter-Util-Call/t/rt_101033.t b/cpan/Filter-Util-Call/t/rt_101033.t
new file mode 100644
index 0000000000..4df361481d
--- /dev/null
+++ b/cpan/Filter-Util-Call/t/rt_101033.t
@@ -0,0 +1,11 @@
+#! perl
+use lib 't';
+use rt_101033;
+
+print "1..1\n";
+my $s = <DATA>;
+print "not " if $s !~ /^test/;
+print "ok 1 # TODO RT #101033 + Switch #97440 ignores __DATA__\n";
+
+__DATA__
+test
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 01f87d59e1..6ace170f45 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -123,6 +123,10 @@ L<Encode> has been upgraded from version 2.75 to 2.76.
=item *
+L<Filter::Util::Call> has been upgraded from version 1.54 to 1.55.
+
+=item *
+
The PathTools module collection has been upgraded from version 3.55 to
3.56.
diff --git a/pod/perlfilter.pod b/pod/perlfilter.pod
index 21df352c9c..60d086401c 100644
--- a/pod/perlfilter.pod
+++ b/pod/perlfilter.pod
@@ -559,15 +559,17 @@ parser.
The only stable usage for source filters are encryption, compression,
or the byteloader, to translate binary code back to source code.
-See for example the limitations in Switch, which uses source filters,
+See for example the limitations in L<Switch>, which uses source filters,
and thus is does not work inside a string eval, the presence of
-regexes with embedded newlines that are specified with raw /.../
-delimiters and don't have a modifier //x are indistinguishable from
-code chunks beginning with the division operator /. As a workaround
-you must use m/.../ or m?...? for such patterns. Also, the presence of
-regexes specified with raw ?...? delimiters may cause mysterious
-errors. The workaround is to use m?...? instead. See
-http://search.cpan.org/perldoc?Switch#LIMITATIONS
+regexes with embedded newlines that are specified with raw C</.../>
+delimiters and don't have a modifier C<//x> are indistinguishable from
+code chunks beginning with the division operator C</>. As a workaround
+you must use C<m/.../> or C<m?...?> for such patterns. Also, the presence of
+regexes specified with raw C<?...?> delimiters may cause mysterious
+errors. The workaround is to use C<m?...?> instead. See
+L<http://search.cpan.org/perldoc?Switch#LIMITATIONS>
+
+Currently the content of the C<__DATA__> block is not filtered.
Currently internal buffer lengths are limited to 32-bit only.
@@ -582,7 +584,7 @@ Some source filters use the C<DATA> handle to read the calling program.
When using these source filters you cannot rely on this handle, nor expect
any particular kind of behavior when operating on it. Filters based on
Filter::Util::Call (and therefore Filter::Simple) do not alter the C<DATA>
-filehandle.
+filehandle, but on the other hand totally ignore the text after C<__DATA__>.
=back
@@ -601,9 +603,11 @@ Damian Conway.
Paul Marquess E<lt>Paul.Marquess@btinternet.comE<gt>
+Reini Urban E<lt>rurban@cpan.orgE<gt>
+
=head1 Copyrights
-This article originally appeared in The Perl Journal #11, and is
-copyright 1998 The Perl Journal. It appears courtesy of Jon Orwant and
-The Perl Journal. This document may be distributed under the same terms
-as Perl itself.
+The first version of this article originally appeared in The Perl
+Journal #11, and is copyright 1998 The Perl Journal. It appears
+courtesy of Jon Orwant and The Perl Journal. This document may be
+distributed under the same terms as Perl itself.