Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

What older version?
$ perltidy < temp.pl #!/usr/bin/perl -- =head1 HASHBANG ## Please see file perltidy.ERR #!/usr/bin/perl -- =cut print "hi\n"; __END__ $ cat perltidy.ERR 5: Hash-bang in pod can cause older versions of perl to fail! $

Replies are listed 'Best First'.
Re: Hash-bang in pod can cause older versions of perl to fail
by FunkyMonk (Chancellor) on Apr 01, 2010 at 20:08 UTC
    Narrowing it down slightly: perl 5.8.8 correctly outputs "hi". 5.6.2 does not.
Re: Hash-bang in pod can cause older versions of perl to fail
by crashtest (Curate) on Apr 01, 2010 at 18:52 UTC

    I can't give you the answer, but I can give you an example of a Perl that can't handle the shebang line in the POD.

    Our UNIX servers happen to have Perl 5.6.1 installed, so I fed your code to it. The process exited without emitting any output (despite the print statement), with exit code 0. This is in contrast to, for example, Perl 5.10.1 (which I have installed locally), which printed "hi" to STDOUT, as expected.

    Your node made me curious, so I spent some time checking the perldelta's from 5.6.1 on, as well as the changelog for Pod::Parser, but I couldn't find a clue as to when the behavior was fixed.

Re: Hash-bang in pod can cause older versions of perl to fail
by Khen1950fx (Canon) on Mar 31, 2010 at 22:03 UTC
    Try it in another way:
    #!/usr/bin/perl use strict; use warnings; print "hi", "\n"; =pod =head1 HASHBANG Start your scripts with #!/usr/bin/perl. =cut __END__
      Why? That wouldn't show the warning I am asking about (my actual question that I asked)