in reply to Re^4: Importing constants into another module
in thread Importing constants into another module

If you did use DNSCheck.pm, you need to leave off the file suffix. From perlmod (ignore the "traditional, non-OO" part of the quote):

For example, to start a traditional, non-OO module called Some::Module +, create a file called Some/Module.pm and start with this template: package Some::Module; # assumes Some/Module.pm
The "::" replaces the path separator.

Replies are listed 'Best First'.
Re^6: Importing constants into another module
by paulski (Beadle) on Feb 03, 2005 at 04:00 UTC

    Sorry that should have read:

    package Check::DNSCheck;

    Serves me right for not copying and pasting. :-\

      Then you probably meant Check::DNSCheck->new

      This assumes there is a file Check/DNSCheck.pm containing package Check::DNSCheck;, and the script includes use Check::DNSCheck;

        Thanks, that got it working...been staring at this so long I didn't even realise that simple mistake.