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
},
'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
],
-
# 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.
@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($)
{
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
*
* 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.
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)
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 ;
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 }
--- /dev/null
+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;
+
--- /dev/null
+#! 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
=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.
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.
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
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.