http://qs1969.pair.com?node_id=529712


in reply to Re: How Do I Bundle Perl Modules and Their Tests Into the Same File?
in thread How Do I Bundle Perl Modules and Their Tests Into the Same File?

hmm, a module need to have "1;" as the last entry. Where does this goes in this case? The last line or in the module it is declaring, e.g for this particalur example in the MyClass package?
  • Comment on Re^2: How Do I Bundle Perl Modules and Their Tests Into the Same File?

Replies are listed 'Best First'.
Re^3: How Do I Bundle Perl Modules and Their Tests Into the Same File?
by ikegami (Patriarch) on Feb 13, 2006 at 03:13 UTC
    Before of after the =begin..=cut, it doesn't matter. When used as a module, =begin..=cut is just a comment, so it's ignored. When used as a script (to test the module), the 1; isn't needed since it's not a module.