Last change
on this file since 31805 was 31805, checked in by ak19, 7 years ago |
Committing the perl 5.24 that Dr Bainbridge successfully built on Ubuntu 16.06 against (a locally compiled, non-system) perl 5.24 perl. It is a byproduct of compiling up a gs3-svn on the Ubuntu 16.04 with the perl 5.24 in the PATH. This perl-5.24 folder was copied from the gs3-svn's gs2build/perllib/cpan folder. It's being committed into the release-kits area as other versions before have been, as it's needed for release-kits, to generate binaries that will work with perl 5.24. However, the version we generated only has Expat.so, not le Expat.bs. Not sure if that's still necessary, and if so, how it should be generated. See http://www.cryst.bbk.ac.uk/CCSG/programming/perl/PerlDoc/lib/ExtUtils/Mkbootstrap.html for ideas, if the bs extension stands for bootstrap as it seems to.
|
File size:
1.1 KB
|
Line | |
---|
1 | # $Id: Subs.pm,v 1.1 2003-07-27 16:07:49 matt Exp $
|
---|
2 |
|
---|
3 | package XML::Parser::Style::Subs;
|
---|
4 |
|
---|
5 | sub Start {
|
---|
6 | no strict 'refs';
|
---|
7 | my $expat = shift;
|
---|
8 | my $tag = shift;
|
---|
9 | my $sub = $expat->{Pkg} . "::$tag";
|
---|
10 | eval { &$sub($expat, $tag, @_) };
|
---|
11 | }
|
---|
12 |
|
---|
13 | sub End {
|
---|
14 | no strict 'refs';
|
---|
15 | my $expat = shift;
|
---|
16 | my $tag = shift;
|
---|
17 | my $sub = $expat->{Pkg} . "::${tag}_";
|
---|
18 | eval { &$sub($expat, $tag) };
|
---|
19 | }
|
---|
20 |
|
---|
21 | 1;
|
---|
22 | __END__
|
---|
23 |
|
---|
24 | =head1 NAME
|
---|
25 |
|
---|
26 | XML::Parser::Style::Subs
|
---|
27 |
|
---|
28 | =head1 SYNOPSIS
|
---|
29 |
|
---|
30 | use XML::Parser;
|
---|
31 | my $p = XML::Parser->new(Style => 'Subs', Pkg => 'MySubs');
|
---|
32 | $p->parsefile('foo.xml');
|
---|
33 |
|
---|
34 | {
|
---|
35 | package MySubs;
|
---|
36 |
|
---|
37 | sub foo {
|
---|
38 | # start of foo tag
|
---|
39 | }
|
---|
40 |
|
---|
41 | sub foo_ {
|
---|
42 | # end of foo tag
|
---|
43 | }
|
---|
44 | }
|
---|
45 |
|
---|
46 | =head1 DESCRIPTION
|
---|
47 |
|
---|
48 | Each time an element starts, a sub by that name in the package specified
|
---|
49 | by the Pkg option is called with the same parameters that the Start
|
---|
50 | handler gets called with.
|
---|
51 |
|
---|
52 | Each time an element ends, a sub with that name appended with an underscore
|
---|
53 | ("_"), is called with the same parameters that the End handler gets called
|
---|
54 | with.
|
---|
55 |
|
---|
56 | Nothing special is returned by parse.
|
---|
57 |
|
---|
58 | =cut |
---|
Note:
See
TracBrowser
for help on using the repository browser.