> > So if you script included __END__ or __DATA__ token like:
> >
> > print "Content-type: text/plain\n\n"
> > print "mod_perl rules!\n"
> > __END__
> > some junk here
> >
> >
> > perl actually sees it as:
> >
> > package Apache::ROOT::perl::test_2epl;
> > use Apache qw(exit);
> > sub handler {
> > print "Content-type: text/plain\n\n"
> > print "mod_perl rules!\n"
> > __END__
> > some junk here
> > }
>
> Would it be possible to remove everything after __END__ before
> wrapping it into a function?
I guess it's possible, we are using perl, don't we?
> Very often this is simply
> documentation. How about =pod and other tokens? Do they also break the code?
yes, there are... you get a code like:
sub handler{
print "hi\n";
=pod
=head1 Hi
=cut
}
which is syntaxically incorrect, pod directives should not appear inside
the subs... I'll add this note too...
_______________________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED] www.singlesheaven.com/stas
Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC
www.apache.org & www.perl.com == www.modperl.com || perl.apache.org
single o-> + single o-+ = singlesheaven http://www.singlesheaven.com