[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

In article <BANLkTikBYCOVX60JyEJNh27ETNYODUXT=w...@mail.gmail.com>, Caleb
Cushing <xenoterrac...@gmail.com> wrote:

> Having a little debate over this on a Perl::Critic ticket. I'm not
> sure anyone is sure and the docs don't say.
> 
> https://rt.cpan.org/Ticket/Display.html?id=69234
> 
> 
> is it package foo { ... 1; }  or package foo { ... }; 1; ? or what?
> and is it possible this could get clarified in the next edition of the
> docs?

You don't need to return true from a package. You need to return true
from a use-d or require-d file so that the last statement in the file
returns true and perl knows it successfully loaded the file. It's
nothing to do with packages. You still need that true value even if you
have no packages declared in that file.

Reply via email to