X-Git-Url: https://git.donarmstrong.com/?p=perltidy.git;a=blobdiff_plain;f=examples%2Fperlxmltok.pl;h=17ef080f02735c040400465563f687c76e66f075;hp=692338d0a090e8525d5f976af97a9a2a874f522c;hb=caa9a6008de8bbc9dddfb772bff67005c099d6dd;hpb=b2d8cef8551aa63c2718732e53392e7ebdd6c75f diff --git a/examples/perlxmltok.pl b/examples/perlxmltok.pl index 692338d..17ef080 100644 --- 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; #####################################################################