X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=examples%2Fperlxmltok.pl;h=17ef080f02735c040400465563f687c76e66f075;hb=7f0d4e4cf8cde72a1e9ea5c3ddc5fb71fc0d7651;hp=692338d0a090e8525d5f976af97a9a2a874f522c;hpb=4107c18ce17515557235b1ac91ab586b46098727;p=perltidy.git diff --git a/examples/perlxmltok.pl b/examples/perlxmltok.pl old mode 100644 new mode 100755 index 692338d..17ef080 --- a/examples/perlxmltok.pl +++ b/examples/perlxmltok.pl @@ -42,13 +42,16 @@ my $formatter = Perl::Tidy::XmlWriter->new($file); my $dest; # start perltidy, which will start calling our write_line() -perltidy( +my $err = perltidy( 'formatter' => $formatter, # callback object 'source' => $source, 'destination' => \$dest, # not really needed 'argv' => "-npro -se", # dont need .perltidyrc # errors to STDOUT ); +if ($err) { + die "Error calling perltidy\n"; +} $fh->close() if $fh; #####################################################################