summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Filter
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-20 18:08:54 +0000
committerKarl Berry <karl@freefriends.org>2012-11-20 18:08:54 +0000
commitc5add2ea5067382269ae6f19e345fda0b9a7bd21 (patch)
tree02f512fda46d93079c9dc59c0d76f0e398150f83 /Master/tlpkg/tlperl/lib/Filter
parent6c35e87bdc5a3f64833dbbc42e7d42e683db9d5b (diff)
perl 5.16.2, compiled without optimization for Windows (from siep)
git-svn-id: svn://tug.org/texlive/trunk@28315 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Filter')
-rw-r--r--Master/tlpkg/tlperl/lib/Filter/Simple.pm25
-rw-r--r--Master/tlpkg/tlperl/lib/Filter/Util/Call.pm7
2 files changed, 20 insertions, 12 deletions
diff --git a/Master/tlpkg/tlperl/lib/Filter/Simple.pm b/Master/tlpkg/tlperl/lib/Filter/Simple.pm
index 2edd798adf3..b0068037f3f 100644
--- a/Master/tlpkg/tlperl/lib/Filter/Simple.pm
+++ b/Master/tlpkg/tlperl/lib/Filter/Simple.pm
@@ -4,7 +4,7 @@ use Text::Balanced ':ALL';
use vars qw{ $VERSION @EXPORT };
-$VERSION = '0.86';
+$VERSION = '0.88';
use Filter::Util::Call;
use Carp;
@@ -36,22 +36,31 @@ my $CUT = qr/\n=cut.*$EOP/;
my $pod_or_DATA = qr/
^=(?:head[1-4]|item) .*? $CUT
| ^=pod .*? $CUT
- | ^=for .*? $EOP
- | ^=begin \s* (\S+) .*? \n=end \s* \1 .*? $EOP
+ | ^=for .*? $CUT
+ | ^=begin .*? $CUT
| ^__(DATA|END)__\r?\n.*
/smx;
+my $variable = qr{
+ [\$*\@%]\s*
+ \{\s*(?!::)(?:\d+|[][&`'#+*./|,";%=~:?!\@<>()-]|\^[A-Z]?)\}
+ | (?:\$#?|[*\@\%]|\\&)\$*\s*
+ (?: \{\s*(?:\^(?=[A-Z_]))?(?:\w|::|'\w)*\s*\}
+ | (?:\^(?=[A-Z_]))?(?:\w|::|'\w)*
+ | (?=\{) # ${ block }
+ )
+ )
+ | \$\s*(?!::)(?:\d+|[][&`'#+*./|,";%=~:?!\@<>()-]|\^[A-Z]?)
+ }x;
my %extractor_for = (
- quotelike => [ $ws, \&extract_variable, $id, { MATCH => \&extract_quotelike } ],
+ quotelike => [ $ws, $variable, $id, { MATCH => \&extract_quotelike } ],
regex => [ $ws, $pod_or_DATA, $id, $exql ],
string => [ $ws, $pod_or_DATA, $id, $exql ],
- code => [ $ws, { DONT_MATCH => $pod_or_DATA },
- \&extract_variable,
+ code => [ $ws, { DONT_MATCH => $pod_or_DATA }, $variable,
$id, { DONT_MATCH => \&extract_quotelike } ],
code_no_comments
=> [ { DONT_MATCH => $comment },
- $ncws, { DONT_MATCH => $pod_or_DATA },
- \&extract_variable,
+ $ncws, { DONT_MATCH => $pod_or_DATA }, $variable,
$id, { DONT_MATCH => \&extract_quotelike } ],
executable => [ $ws, { DONT_MATCH => $pod_or_DATA } ],
executable_no_comments
diff --git a/Master/tlpkg/tlperl/lib/Filter/Util/Call.pm b/Master/tlpkg/tlperl/lib/Filter/Util/Call.pm
index 1d1b2618f0e..a502575a615 100644
--- a/Master/tlpkg/tlperl/lib/Filter/Util/Call.pm
+++ b/Master/tlpkg/tlperl/lib/Filter/Util/Call.pm
@@ -1,7 +1,7 @@
# Call.pm
#
-# Copyright (c) 1995-2009 Paul Marquess. All rights reserved.
+# Copyright (c) 1995-2011 Paul Marquess. 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.08" ;
+$VERSION = "1.40" ;
sub filter_read_exact($)
{
@@ -483,8 +483,7 @@ Filter::Util::Call. Although it doesn't allow the fine control that
Filter::Util::Call does, it should be adequate for the majority of
applications. It's available at
- http://www.cpan.org/modules/by-author/Damian_Conway/Filter-Simple.tar.gz
- http://www.csse.monash.edu.au/~damian/CPAN/Filter-Simple.tar.gz
+ http://search.cpan.org/dist/Filter-Simple/
=head1 AUTHOR