From 6aa12ae5f556ab884b7705379c41a566df86d028 Mon Sep 17 00:00:00 2001 From: "Paul Buetow (pluto.buetow.org)" Date: Sun, 15 Sep 2013 11:51:10 +0200 Subject: temp remove includedirs tag, perltidy indention set to 2, initial XML::LibXML --- Xerl/Page/Document.pm | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'Xerl/Page/Document.pm') diff --git a/Xerl/Page/Document.pm b/Xerl/Page/Document.pm index bb58016..afc4da3 100644 --- a/Xerl/Page/Document.pm +++ b/Xerl/Page/Document.pm @@ -38,38 +38,38 @@ use Xerl::Page::Configure; use Xerl::Tools::FileIO; sub parse($) { - my Xerl::Page::Document $self = $_[0]; - my Xerl::Page::Configure $config = $self->get_config(); + my Xerl::Page::Document $self = $_[0]; + my Xerl::Page::Configure $config = $self->get_config(); - return undef unless $config->document_exists(); + return undef unless $config->document_exists(); - my $document = $config->get_document(); - my ($filename) = $document =~ m#([^/]+)$#; - my ($postfix) = $document =~ /\.(.+)$/; - my $path; + my $document = $config->get_document(); + my ($filename) = $document =~ m#([^/]+)$#; + my ($postfix) = $document =~ /\.(.+)$/; + my $path; - print 'Content-Type: '; - print $config->getval( 'ctype.' . lc($postfix) ), "\n"; - print "Content-Disposition: attachment; filename=\"$filename\"\n\n"; + print 'Content-Type: '; + print $config->getval( 'ctype.' . lc($postfix) ), "\n"; + print "Content-Disposition: attachment; filename=\"$filename\"\n\n"; - $path = $config->get_hostpath() . "/htdocs/$document"; - unless ( -f $path ) { - $path = - $config->get_hostroot() - . $config->get_defaulthost() - . "/htdocs/$document"; - } + $path = $config->get_hostpath() . "/htdocs/$document"; + unless ( -f $path ) { + $path = + $config->get_hostroot() + . $config->get_defaulthost() + . "/htdocs/$document"; + } - my Xerl::Tools::FileIO $io = Xerl::Tools::FileIO->new( path => $path ); + my Xerl::Tools::FileIO $io = Xerl::Tools::FileIO->new( path => $path ); - if ( -1 == $io->fslurp() ) { - $config->set_finish_request(1); - } - else { - $io->print(); - } + if ( -1 == $io->fslurp() ) { + $config->set_finish_request(1); + } + else { + $io->print(); + } - return undef; + return undef; } 1; -- cgit v1.2.3