diff options
Diffstat (limited to 'Xerl')
| -rw-r--r-- | Xerl/Base.pm | 2 | ||||
| -rw-r--r-- | Xerl/Main/Global.pm | 2 | ||||
| -rw-r--r-- | Xerl/Page/Configure.pm | 2 | ||||
| -rw-r--r-- | Xerl/Page/Content.pm | 2 | ||||
| -rw-r--r-- | Xerl/Page/Document.pm | 2 | ||||
| -rw-r--r-- | Xerl/Page/Menu.pm | 2 | ||||
| -rw-r--r-- | Xerl/Page/Parameter.pm | 2 | ||||
| -rw-r--r-- | Xerl/Page/Request.pm | 2 | ||||
| -rw-r--r-- | Xerl/Page/Rules.pm | 2 | ||||
| -rw-r--r-- | Xerl/Page/Templates.pm | 2 | ||||
| -rw-r--r-- | Xerl/Tools/FileIO.pm | 2 | ||||
| -rw-r--r-- | Xerl/XML/Element.pm | 2 | ||||
| -rw-r--r-- | Xerl/XML/Reader.pm | 13 | ||||
| -rw-r--r-- | Xerl/XML/SAXHandler.pm | 29 |
14 files changed, 32 insertions, 34 deletions
diff --git a/Xerl/Base.pm b/Xerl/Base.pm index 3458dac..e0119d8 100644 --- a/Xerl/Base.pm +++ b/Xerl/Base.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package UNIVERSAL; diff --git a/Xerl/Main/Global.pm b/Xerl/Main/Global.pm index 6a3172f..8183610 100644 --- a/Xerl/Main/Global.pm +++ b/Xerl/Main/Global.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Main::Global; diff --git a/Xerl/Page/Configure.pm b/Xerl/Page/Configure.pm index a9753d2..9521afc 100644 --- a/Xerl/Page/Configure.pm +++ b/Xerl/Page/Configure.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Page::Configure; diff --git a/Xerl/Page/Content.pm b/Xerl/Page/Content.pm index fe88ece..caa2b8a 100644 --- a/Xerl/Page/Content.pm +++ b/Xerl/Page/Content.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Page::Content; diff --git a/Xerl/Page/Document.pm b/Xerl/Page/Document.pm index af0ac76..0dc132e 100644 --- a/Xerl/Page/Document.pm +++ b/Xerl/Page/Document.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Page::Document; diff --git a/Xerl/Page/Menu.pm b/Xerl/Page/Menu.pm index a5a9f8d..254161c 100644 --- a/Xerl/Page/Menu.pm +++ b/Xerl/Page/Menu.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Page::Menu; diff --git a/Xerl/Page/Parameter.pm b/Xerl/Page/Parameter.pm index 2c987a8..42b0d19 100644 --- a/Xerl/Page/Parameter.pm +++ b/Xerl/Page/Parameter.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Page::Parameter; diff --git a/Xerl/Page/Request.pm b/Xerl/Page/Request.pm index ab2e9b4..67d9b85 100644 --- a/Xerl/Page/Request.pm +++ b/Xerl/Page/Request.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Page::Request; diff --git a/Xerl/Page/Rules.pm b/Xerl/Page/Rules.pm index 2734782..f9142fc 100644 --- a/Xerl/Page/Rules.pm +++ b/Xerl/Page/Rules.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Page::Rules; diff --git a/Xerl/Page/Templates.pm b/Xerl/Page/Templates.pm index 20729e5..cb1d674 100644 --- a/Xerl/Page/Templates.pm +++ b/Xerl/Page/Templates.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Page::Templates; diff --git a/Xerl/Tools/FileIO.pm b/Xerl/Tools/FileIO.pm index 69c8218..fb0946b 100644 --- a/Xerl/Tools/FileIO.pm +++ b/Xerl/Tools/FileIO.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::Tools::FileIO; diff --git a/Xerl/XML/Element.pm b/Xerl/XML/Element.pm index 4edade2..9aa3c2f 100644 --- a/Xerl/XML/Element.pm +++ b/Xerl/XML/Element.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::XML::Element; diff --git a/Xerl/XML/Reader.pm b/Xerl/XML/Reader.pm index 1828e18..176f405 100644 --- a/Xerl/XML/Reader.pm +++ b/Xerl/XML/Reader.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::XML::Reader; @@ -21,7 +21,8 @@ sub open($) { if ( -f $self->get_path() ) { return 0; - } else { + } + else { return 1; } } @@ -30,13 +31,11 @@ sub parse() { my Xerl::XML::Reader $self = $_[0]; my $sax_handler = Xerl::XML::SAXHandler->new(); - my $parser = XML::SAX::ParserFactory->parser( - Handler => $sax_handler - ); + my $parser = XML::SAX::ParserFactory->parser( Handler => $sax_handler ); - $parser->parse_uri($self->get_path()); + $parser->parse_uri( $self->get_path() ); - $self->set_root($sax_handler->{xerl}{root}); + $self->set_root( $sax_handler->{xerl}{root} ); return undef; } diff --git a/Xerl/XML/SAXHandler.pm b/Xerl/XML/SAXHandler.pm index 0b6b425..47febc2 100644 --- a/Xerl/XML/SAXHandler.pm +++ b/Xerl/XML/SAXHandler.pm @@ -2,7 +2,7 @@ # # E-Mail: xerl@dev.buetow.org WWW: http://xerl.buetow.org # -# This is free software, you may use it and distribute it under the same +# This is free software, you may use it and distribute it under the same # terms as Perl itself. package Xerl::XML::SAXHandler; @@ -20,39 +20,38 @@ use Xerl::Base; use Xerl::XML::Element; sub start_document { - my ($self, $doc) = @_; + my ( $self, $doc ) = @_; - $self->{xerl}{root} = undef; + $self->{xerl}{root} = undef; $self->{xerl}{current} = undef; - $self->{xerl}{stack} = []; - + $self->{xerl}{stack} = []; return undef; } sub start_element { - my ($self, $doc) = @_; + my ( $self, $doc ) = @_; my $x = $self->{xerl}; - if (defined $x->{current}) { - push @{$x->{stack}}, $x->{current}; + if ( defined $x->{current} ) { + push @{ $x->{stack} }, $x->{current}; $x->{root} = $x->{current} unless defined $x->{root}; } - my %params = map { $_->{Name} => $_->{Value} } values %{$doc->{Attributes}}; + my %params = map { $_->{Name} => $_->{Value} } values %{ $doc->{Attributes} }; $x->{current} = Xerl::XML::Element->new(); $x->{current}->set_text(''); - $x->{current}->set_name($doc->{Name}); - $x->{current}->set_params(\%params) if %params; + $x->{current}->set_name( $doc->{Name} ); + $x->{current}->set_params( \%params ) if %params; - ${$x->{stack}}[-1]->push_array($x->{current}) if @{$x->{stack}}; + ${ $x->{stack} }[-1]->push_array( $x->{current} ) if @{ $x->{stack} }; return undef; } sub characters { - my ($self, $doc) = @_; + my ( $self, $doc ) = @_; my $x = $self->{xerl}; my $data = $doc->{Data}; @@ -66,10 +65,10 @@ sub characters { } sub end_element { - my ($self, $doc) = @_; + my ( $self, $doc ) = @_; my $x = $self->{xerl}; - $x->{current} = pop @{$x->{stack}}; + $x->{current} = pop @{ $x->{stack} }; return undef; } |
