in reply to Re: packages and Exporter
in thread packages and Exporter

Why would you insert the use strict; after the package instead of before it? What are the advantages of this?

Thanks,

xenchu

Perl has one Great Advantage and one Great Disadvantage:

It is very easy to write a complex and powerful program in three lines of code.

********************************************

The Needs of the World and my Talents run parallel to infinity.

Replies are listed 'Best First'.
Re^3: packages and Exporter
by adrianh (Chancellor) on Dec 05, 2003 at 13:57 UTC
    Why would you insert the use strict; after the package instead of before it? What are the advantages of this?

    Why not? :-)

    The issue isn't whether the strict declaration is before/after the package declaration. The issue is ensuring that the declaration of the package globals doesn't cause a error when strict is being used.

    Using an explicit package name is one method. Using use vars or our are two others.