On Fri, Jun 7, 2013 at 2:40 AM, Roderich Schupp <
roderich.sch...@googlemail.com> wrote:

>
> On Thu, Jun 6, 2013 at 8:50 PM, Fulko Hew <fulko....@gmail.com> wrote:
>
>> Can anyone tell me whats wrong?
>
>
> TL;DR Use __DATA__ instead of __END__ and it works.
>

Thanks for the lead.  I _had_ tried something close to that, but what I
failed to
realize and mention was that my main application was defined in a package
called Main.

So (in case someone stumbles across this email in the archives)
here is the results and conclusions:

a) the use of __END__ does work in the case of non-PAR packed code
(Note: the ref doesn't match the package name)
package Main;
pod2usage(-verbose => 2, -input => \*main::DATA);
__END__
=pod
stuff
==cut

b) When using __DATA__ (you of course) have to have the ref match the
package name
    AND ... this works with PAR and non-PAR alike.

package Main;
pod2usage(-verbose => 2, -input => \*Main::DATA);
__DATA__
=pod
stuff
==cut

Reply via email to