Hi Manfred, On Wed, 5 Feb 2014 10:51:56 +0100 Manfred Lotz <manfred.l...@arcor.de> wrote:
> Hi all, > Perl 5.14 allows package blocks. > > Assume i have a file Hello.pm > > package Hello; { > ... > > 1; > } I think the syntax is «package Hello { ... }» without the semicolon. > # or better here > # 1; > > > My question is: Would I put 1; inside the { } or should I put it > outside the { }. > The 1 is for "require" or "use". It is safer to put it as the absolutely last thing in the file - outside the { ... }: Hello.pm: --------- package Hello { sub hello { ... } ... }; 1; [END OF Hello.pm]. Regards, -- Shlomi Fish > -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Free (Creative Commons) Music Downloads, Reviews and more - http://jamendo.com/ Chuck Norris is a real programmer. He writes programs by implementing the most optimised machines for them using real atoms. — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/