in reply to Re^2: Using packages to store global configuration vars
in thread Using packages to store global configuration vars

Most likely you're calling the core module Config, you should adjust your @INC path accordingly.

UPDATE: ...or just rename your configuration file and package .

Cheers Rolf

  • Comment on Re^3: Using packages to store global configuration vars

Replies are listed 'Best First'.
Re^4: Using packages to store global configuration vars
by fuzzyping (Chaplain) on Sep 06, 2009 at 22:15 UTC

    That was it! Thanks for the pointer. I think I'll try Exporter again now. :)

    -fp
      I think I'll try Exporter again now. :)

      actually in your rather restricted case, I'd personally prefer a simple require without importing in the main namespace.

      use strict; use lib "/tmp"; require "Conf.pm"; print $Conf::pckvar;

      Cheers Rolf