in reply to My module's methods aren't working under Mason pages?

I put your code in a small script and executed it without problem. I think your Mason code is picking up a same module somewhere in your path and gets the error.

You can try one of the followings:

  • Comment on Re: My module's methods aren't working under Mason pages?

Replies are listed 'Best First'.
Re^2: My module's methods aren't working under Mason pages?
by Anonymous Monk on Aug 10, 2011 at 07:14 UTC

    Dump the @INC from your Mason code and go thru all paths to see if there is somewhere another CMS/Users.pm

    Or dump %INC instead :)

      @INC and %INC are 2 different things :)

      print Dumper( \@INC ); $VAR1 = [ '/usr/lib/perl5/5.10/i686-cygwin', '/usr/lib/perl5/5.10', '/usr/lib/perl5/site_perl/5.10/i686-cygwin', '/usr/lib/perl5/site_perl/5.10', '/usr/lib/perl5/vendor_perl/5.10/i686-cygwin', '/usr/lib/perl5/vendor_perl/5.10', '/usr/lib/perl5/vendor_perl/5.10', '/usr/lib/perl5/site_perl/5.8', '/usr/lib/perl5/vendor_perl/5.8', '.' ]; print Dumper( \%INC );' $VAR1 = { 'warnings/register.pm' => '/usr/lib/perl5/5.10/warnings/regi +ster.pm', 'bytes.pm' => '/usr/lib/perl5/5.10/bytes.pm', 'XSLoader.pm' => '/usr/lib/perl5/5.10/i686-cygwin/XSLoader.p +m', 'Carp.pm' => '/usr/lib/perl5/5.10/Carp.pm', 'Exporter.pm' => '/usr/lib/perl5/5.10/Exporter.pm', 'warnings.pm' => '/usr/lib/perl5/5.10/warnings.pm', 'overload.pm' => '/usr/lib/perl5/5.10/overload.pm', 'Data/Dumper.pm' => '/usr/lib/perl5/5.10/i686-cygwin/Data/Du +mper.pm' };

      If you need to check your paths @INC is a better option :)

        If you need to check your paths @INC is a better option :)

        Clearly the opposite is true

Re^2: My module's methods aren't working under Mason pages?
by Anonymous Monk on Aug 11, 2011 at 20:59 UTC
    Thanks for the help! Renaming it seems to have done the trick for fixing the error. I've got no idea where there is another CMS/Users.pm though so that's a little weird. But hey. It works and that's what counts. Thanks again!

      I've got no idea where there is another CMS/Users.pm though so that's a little weird.

      %INC tells you which .pm was loaded , and where it was loaded from