[Canberra-pm] Perl social faux pas

Daniel Pittman daniel at rimspace.net
Wed Jul 30 04:42:12 PDT 2008


Paul Matthews <plm at netspace.net.au> writes:

> G'Day All,
>
> Is it a faux pas in perl to place multiple 'objects' into a single
> module file?

Well, it certainly isn't "best practices"; it couples your packages
together very tightly and prevents auto-loading of anything but the
package with the same name as the file.

However, other than assumptions that this isn't the case some fairly
widely used modules do this, to good effect.

I would advise it only if your additional modules are, very
specifically, internal subclasses of the major class for reasons such as
platform API management, rather than anything a third party might use.

Regards,
        Daniel


More information about the Canberra-pm mailing list