Skip to content

Commit 84c02bf

Browse files
Yanick ChampouxGitpan
authored andcommitted
Import of YANICK/XML-XPathScript-1.54 from CPAN.
gitpan-cpan-distribution: XML-XPathScript gitpan-cpan-version: 1.54 gitpan-cpan-path: YANICK/XML-XPathScript-1.54.tar.gz gitpan-cpan-author: YANICK gitpan-cpan-maturity: released
1 parent 4b490c1 commit 84c02bf

File tree

12 files changed

+56
-55
lines changed

12 files changed

+56
-55
lines changed

Changes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
Revision history for Perl module XML::XPathScript
22

3+
1.54 July 26, 2008
4+
- Fix bugs in stylesheet DocBook2LaTex
5+
- Fix bug in X::X::Processor::B where there is no whitespace
6+
between the tagname and the first attribute.
7+
- Change Readonly call in X::X::Processor to try to please Perl 5.6 and
8+
earlier.
9+
- Getting rid of internal class StdoutSnatcher.
10+
311
1.53 Dec 18, 2007
412
- If no XML parser is present during installation, add XML::LibXML
513
to the dependencies (thanks to David for the bug report)

META.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: XML-XPathScript
3-
version: 1.53
3+
version: 1.54
44
author:
55
- 'Yanick Champoux <yanick@cpan.org>'
66
- 'Dominique Quatravaux <domq@cpan.org> '
@@ -25,32 +25,30 @@ build_requires:
2525
provides:
2626
XML::XPathScript:
2727
file: lib/XML/XPathScript.pm
28-
version: 1.53
28+
version: 1.54
2929
XML::XPathScript::Processor:
3030
file: lib/XML/XPathScript/Processor.pm
31-
version: 1.53
31+
version: 1.54
3232
XML::XPathScript::Processor::B:
3333
file: lib/XML/XPathScript/Processor/B.pm
34-
version: 1.53
34+
version: 1.54
3535
XML::XPathScript::Processor::LibXML:
3636
file: lib/XML/XPathScript/Processor/LibXML.pm
37-
version: 1.53
37+
version: 1.54
3838
XML::XPathScript::Processor::XPath:
3939
file: lib/XML/XPathScript/Processor/XPath.pm
40-
version: 1.53
41-
XML::XPathScript::StdoutSnatcher:
42-
file: lib/XML/XPathScript.pm
40+
version: 1.54
4341
XML::XPathScript::Stylesheet::DocBook2LaTeX:
4442
file: lib/XML/XPathScript/Stylesheet/DocBook2LaTeX.pm
45-
version: 1.53
43+
version: 1.54
4644
XML::XPathScript::Template:
4745
file: lib/XML/XPathScript/Template.pm
48-
version: 1.53
46+
version: 1.54
4947
XML::XPathScript::Template::Content:
5048
file: lib/XML/XPathScript/Processor.pm
5149
XML::XPathScript::Template::Tag:
5250
file: lib/XML/XPathScript/Template/Tag.pm
53-
version: 1.53
51+
version: 1.54
5452
generated_by: Module::Build version 0.280801
5553
meta-spec:
5654
url: http://module-build.sourceforge.net/META-spec-v1.2.html

SIGNATURE

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ not run its Makefile.PL or Build.PL.
1515
Hash: SHA1
1616

1717
SHA1 2554a1c42ac19f0bfc7b5c391676f3343a2ad232 Build.PL
18-
SHA1 47a46a449cf77844a3f743be42cf84638f185071 Changes
18+
SHA1 6289a7b63e6cddf0139fd9d74705adf0d07464fa Changes
1919
SHA1 05a5f3528ef8a73c665e5e73cfe088a22841d60f MANIFEST
20-
SHA1 a65624f3fca72342c09e93f2ab1c129e2d8ca524 META.yml
20+
SHA1 c12cf66c790482c504d042650f963b8effc940d3 META.yml
2121
SHA1 1794aad4c7569a63f2638e58789ee2f1ad3a86a8 Makefile.PL
2222
SHA1 0b05cc0bbf188500b5260ae83f500e5af82735ca README
2323
SHA1 585dbee14359e90630096c4c39d944c3ed5fd0df dist/rewrite-default-xml-parser
2424
SHA1 b8f13d00c750860ca69a0f2be632fdb0cf1b3256 examples/docbook2latex.xps
2525
SHA1 49de2221717af40dfd852e18c46650097290aa1f examples/sample-docbook.xml
26-
SHA1 b43bb4925898cef7d35be8ba6a3650afce90acac lib/XML/XPathScript.pm
27-
SHA1 d96184b54fe2bb56809c9fb37ec8b75287ead850 lib/XML/XPathScript/Processor.pm
28-
SHA1 1d075f69703ddcc3e5259faba0188174620f1473 lib/XML/XPathScript/Processor/B.pm
29-
SHA1 dd7458db336c56db2bc69b2ab0c8acebfda92611 lib/XML/XPathScript/Processor/LibXML.pm
30-
SHA1 e5147416e4c022a9d5fb8ae55be536a45a2ef90f lib/XML/XPathScript/Processor/XPath.pm
26+
SHA1 477417aa6f19e280f0a99cfebe898709b43f58fc lib/XML/XPathScript.pm
27+
SHA1 425d3d5866d0f5214672883c58efc52f8f0188ac lib/XML/XPathScript/Processor.pm
28+
SHA1 2c6197b637d04230d08c55db4b5cf19804ff558c lib/XML/XPathScript/Processor/B.pm
29+
SHA1 873b0493b0ad13eecdfa8eaac69f139a23d75e0c lib/XML/XPathScript/Processor/LibXML.pm
30+
SHA1 433d1eb212012aeb6450a4137f08bbf89c958e77 lib/XML/XPathScript/Processor/XPath.pm
3131
SHA1 4f2bd67d33fd417629c6cff2a0d3053035c45e03 lib/XML/XPathScript/Stylesheet.pod
32-
SHA1 5516c9b56da12b33d0c60134f564a84e30779518 lib/XML/XPathScript/Stylesheet/DocBook2LaTeX.pm
33-
SHA1 c61b07ac8d1e4d791c19f879e13ace684784b762 lib/XML/XPathScript/Template.pm
34-
SHA1 9aba6566eb13651c8ba5d1c5927754e8a6674007 lib/XML/XPathScript/Template/Tag.pm
32+
SHA1 f667a41fd6c92916e6205fadbadb7d22b9c86bd2 lib/XML/XPathScript/Stylesheet/DocBook2LaTeX.pm
33+
SHA1 9bba29e14e803933b09efb3eadca5eefbdf2bd8c lib/XML/XPathScript/Template.pm
34+
SHA1 19ba4614630c35a3059dffa8e18876ba6d0d6afa lib/XML/XPathScript/Template/Tag.pm
3535
SHA1 44a91906b1c3ba4b2bddec121e96c77c97f30081 lib_axkit/Apache/AxKit/Language/YPathScript.pm
3636
SHA1 553248592b413f49ea7f739d1da52f2fc2219b53 lib_tomkit/Apache2/TomKit/Processor/XPathScript.pm
37-
SHA1 a73bfb7ff30574b701eba6e321083f6e0690ffe2 script/xpathscript
37+
SHA1 0475c452e5a471b610041abd6b24b177748e7186 script/xpathscript
3838
SHA1 0fabf086f09dd536eab3e44118e71ed456a53eb1 t/00build.t
3939
SHA1 9d8a3166da409cfa69237aaf8228e17f6e75cf9a t/01basic.t
4040
SHA1 66b1a741ea182ba1ff9fcdc6527ee3fdbbec10ef t/02interpolate.t
@@ -100,9 +100,9 @@ SHA1 e739fa89f56b123580d539d5e2d400c6abd108d5 t/testdocs/tag_attributes.expected
100100
SHA1 db53da51ad4ff13761a69ee9b0e12315f7623fc5 t/testdocs/tag_attributes.xml
101101
SHA1 d36ad2b5860e4ca564b845e0e7bb5d5134624d6e t/testdocs/tag_attributes.xps
102102
-----BEGIN PGP SIGNATURE-----
103-
Version: GnuPG v1.4.3 (GNU/Linux)
103+
Version: GnuPG v2.0.7 (GNU/Linux)
104104

105-
iD8DBQFHaIDf34Hwf+GwC4wRAkS+AJ9mG5ukejenOpKQWN48BfOhKslYawCcDRNN
106-
ZqDyr/N2bbwZvO8zrT0SUYM=
107-
=xccT
105+
iD8DBQFIi4tn34Hwf+GwC4wRApKMAJ45/53zHAFfm4qNgae6xY3cnYYlrACg8fAn
106+
eArdMMSPcsD2SEX0daapB/Q=
107+
=lCA1
108108
-----END PGP SIGNATURE-----

lib/XML/XPathScript.pm

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ use File::Basename;
239239
use XML::XPathScript::Processor;
240240
use XML::XPathScript::Template;
241241

242-
our $VERSION = '1.53';
242+
our $VERSION = '1.54';
243243

244244
$XML_parser = 'XML::LibXML';
245245

@@ -649,7 +649,7 @@ sub process {
649649
# Perl 5.6.1 dislikes closed but tied descriptors (causes SEGVage)
650650
*STDOUT = *ORIGINAL_STDOUT if $^V lt v5.7.0;
651651

652-
tie *STDOUT, 'XML::XPathScript::StdoutSnatcher';
652+
tie *STDOUT, __PACKAGE__;
653653
$self->compile unless $self->{compiledstylesheet};
654654
my $retval = $self->{compiledstylesheet}->( $self, @extravars );
655655
untie *STDOUT;
@@ -1186,12 +1186,6 @@ sub document {
11861186
return $results;
11871187
}
11881188

1189-
1;
1190-
1191-
# small package to catch print statements within
1192-
# the stylesheets
1193-
package XML::XPathScript::StdoutSnatcher;
1194-
11951189
sub TIEHANDLE { my $self = ''; bless \$self, $_[0] }
11961190
sub PRINT {
11971191
my $self = shift;
@@ -1201,7 +1195,7 @@ sub BINMODE {
12011195
return XML::XPathScript::current()->binmode( @_ );
12021196
}
12031197

1204-
'end of XML::XPathScript::StdoutSnatcher' ;
1198+
1;
12051199

12061200
__END__
12071201

lib/XML/XPathScript/Processor.pm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use base qw/ Exporter /;
99
use XML::XPathScript::Template;
1010
use Readonly;
1111

12-
our $VERSION = '1.53';
12+
our $VERSION = '1.54';
1313

1414
our @EXPORT = qw/
1515
$DO_SELF_AS_CHILD
@@ -68,10 +68,10 @@ use constant DO_NOT_PROCESS => 0;
6868

6969
our( $DO_SELF_AS_CHILD, $DO_SELF_AND_KIDS,
7070
$DO_SELF_ONLY, $DO_NOT_PROCESS );
71-
Readonly $DO_SELF_AS_CHILD => 2;
72-
Readonly $DO_SELF_AND_KIDS => 1;
73-
Readonly $DO_SELF_ONLY => -1;
74-
Readonly $DO_NOT_PROCESS => 0;
71+
Readonly::Scalar $DO_SELF_AS_CHILD => 2;
72+
Readonly::Scalar $DO_SELF_AND_KIDS => 1;
73+
Readonly::Scalar $DO_SELF_ONLY => -1;
74+
Readonly::Scalar $DO_NOT_PROCESS => 0;
7575

7676

7777
sub new {

lib/XML/XPathScript/Processor/B.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package XML::XPathScript::Processor::B;
55

66
use base qw/ XML::XPathScript::Processor /;
77

8-
our $VERSION = '1.53';
8+
our $VERSION = '1.54';
99

1010
# No namespaces here
1111
sub get_namespace { }
@@ -41,7 +41,7 @@ sub get_attributes {
4141
return;
4242
}
4343

44-
sub get_attribute { "$_[1][0]='$_[1][1]' " }
44+
sub get_attribute { " $_[1][0]='$_[1][1]' " }
4545

4646
# it's all element nodes
4747
sub is_element_node { 1 }

lib/XML/XPathScript/Processor/LibXML.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use warnings;
55

66
use base qw/ XML::XPathScript::Processor /;
77

8-
our $VERSION = '1.53';
8+
our $VERSION = '1.54';
99

1010
sub get_namespace {
1111
my $ns = $_[1]->getNamespaces();

lib/XML/XPathScript/Processor/XPath.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package XML::XPathScript::Processor::XPath;
55

66
use base qw/ XML::XPathScript::Processor /;
77

8-
our $VERSION = '1.53';
8+
our $VERSION = '1.54';
99

1010
sub get_namespace {
1111
my $prefix = $_[1]->getPrefix or return;

lib/XML/XPathScript/Stylesheet/DocBook2LaTeX.pm

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use strict;
66
use XML::XPathScript::Processor;
77
use Carp;
88

9-
our $VERSION = '1.53';
9+
our $VERSION = '1.54';
1010

1111
our $processor;
1212

@@ -280,7 +280,7 @@ sub tc_quote {
280280
my ($self,$t)=@_;
281281

282282
my $lang=langofnode($self);
283-
my ($nested)=findnodes("ancestor::quote",$self);
283+
my ($nested)= $self->findnodes("ancestor::quote");
284284

285285
if ($lang && $lang =~ m/^fr/i) {
286286
if ($nested) {
@@ -303,7 +303,8 @@ sub tc_quote {
303303
}
304304

305305
sub langofnode {
306-
return findvalue('(ancestor::*/@lang)[position()=last()]',$_[0]);
306+
my $self = shift;
307+
return $self->findvalue('(ancestor::*/@lang)[position()=last()]');
307308
}
308309

309310
sub tc_varlisentry {
@@ -799,7 +800,7 @@ $template->{'orderedlist'}->{testcode}=sub {
799800
# also have "continuation=Continues" set, and then another list
800801
# that doesn't have it.
801802

802-
my $cont=findvalue('@continuation',$self);
803+
my $cont= $self->findvalue('@continuation');
803804
if ($cont && ($cont =~ m/continues/i)) {
804805
my $num=0;
805806

@@ -821,13 +822,13 @@ $template->{'orderedlist'}->{testcode}=sub {
821822
$template->{'ulink'}->{testcode}=sub {
822823
my ($self, $t)=@_;
823824

824-
my $url="\\texttt{".utf8totex(findvalue('@url',$self),
825+
my $url="\\texttt{".utf8totex( $self->findvalue('@url'),
825826
{
826827
ord(" ")=>"\\ ",
827828
ord('@')=>'@',
828829
})."}";
829830

830-
if (findnodes("node()", $self)) {
831+
if ( $self->findnodes("node()") ) {
831832
$t->{post}=render_footnote($self, $url);
832833
$t->{pre}="";
833834
return 1;
@@ -939,7 +940,7 @@ sub footnotes_allowed {
939940
my ($self)=@_;
940941
#warn "footnotes_allowed",get_xpath_of_node($self);
941942

942-
my ($parent)=findnodes("..", $self);
943+
my ($parent)= $self->findnodes('..');
943944
if (!defined $parent) {
944945
#warn "footnotes_allowed hit root";
945946
return 1
@@ -954,7 +955,7 @@ sub footnotes_allowed {
954955
$is_footnote_blocker=sub {
955956
my ($self)=@_;
956957

957-
my $nodename=findvalue("name()", $self);
958+
my $nodename= $self->findvalue('name()');
958959
return undef if (! $nodename); # Root node
959960
return grep {$_ eq $nodename} @footnote_blockers;
960961
};

lib/XML/XPathScript/Template.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use Scalar::Util qw/ refaddr /;
1313
use overload '&{}' => \&_overload_func,
1414
q{""} => \&_overload_quote;
1515

16-
our $VERSION = '1.53';
16+
our $VERSION = '1.54';
1717

1818
sub new {
1919
my( $class ) = @_;

0 commit comments

Comments
 (0)