Skip Menu |
 

This queue is for tickets about the TryCatch CPAN distribution.

Report information
The Basics
Id: 60030
Status: open
Priority: 0/
Queue: TryCatch

People
Owner: Nobody in particular
Requestors: spiceman [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.000002
Fixed in: (no value)



Subject: Compilation fails when try{} catch {} is followed by POD
Download (untitled) / with headers
text/plain 514b
6:05 spiceman@cynic ~ % perl -MV=TryCatch TryCatch /home/marcel/perl5/lib/perl5/i686-linux/TryCatch.pm: 1.002000 /home/marcel/perl5/lib/perl5/i686-linux/TryCatch.pm: 1.002000 6:05 spiceman@cynic ~ % cat a.pl #!/usr/bin/env perl use strict; use warnings; use TryCatch v1.002; try { } catch { } =pod TryCatch b0rks when immediately followed by POD documentation =cut 6:05 spiceman@cynic ~ % perl a.pl syntax error at a.pl line 12, near ";=" Execution of a.pl aborted due to compilation errors.
Download (untitled) / with headers
text/plain 422b
I believe this is in fact a Perl Parser error. I've in the past encountered similar problems with Pod in similar contexts to the one you demonstrate, with *no* externalities and using only core perl functions!. http://blog.fox.geek.nz/2010/06/todays-amusing-perl-parser-confusion.html If I'm correct, this problem is not explicitly TryCatch. You may wish to, in lack of a better solution, put your pod after __END__
Download (untitled) / with headers
text/plain 684b
On Fri Aug 06 05:53:56 2010, KENTNL wrote: Show quoted text
> I believe this is in fact a Perl Parser error. > > I've in the past encountered similar problems with Pod in similar > contexts to the one you demonstrate, with *no* externalities and using > only core perl functions!. > > http://blog.fox.geek.nz/2010/06/todays-amusing-perl-parser-confusion.html > > If I'm correct, this problem is not explicitly TryCatch. > > You may wish to, in lack of a better solution, put your pod after __END__
I think this is to do with where TryCatch inserts a semicolon. The temporary fix is to insert one of them yourself until I get round to fixing this. try { } catch { } ; =pod here...
Download (untitled) / with headers
text/plain 535b
On Fri Aug 06 05:53:56 2010, KENTNL wrote: Show quoted text
> I believe this is in fact a Perl Parser error. > > I've in the past encountered similar problems with Pod in similar > contexts to the one you demonstrate, with *no* externalities and using > only core perl functions!. > > http://blog.fox.geek.nz/2010/06/todays-amusing-perl-parser-
confusion.html Show quoted text
>
That's to be expected, since you're actually writing 1 =pod =cut. But in try {} catch {} =pod there's no semi-colon, and the compiler complains about one. That's not really expected.
Download (untitled) / with headers
text/plain 390b
Sorry, I knew the workaround and completely failed to mention it. Good thing it is not here for everyone to see. Thanks On Sat Aug 07 05:50:06 2010, ASH wrote: Show quoted text
> I think this is to do with where TryCatch inserts a semicolon. The > temporary fix is to insert > one of them yourself until I get round to fixing this. > > try { > } > catch { > } > ; > > =pod > here... > > > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.