Whether you use the "indirect object" form of method call as you're doing above, or the "object-oriented" form, the class name determines where Perl will find the new() method. Since there isn't a class named literally "ILLString", Perl will complain about the latter call above (as you've no doubt discovered).

That's true, but what we're talking about isn't necessarily objects. Please see my previous message about using the Exporter module to export function names into the caller's namespace.


Take a look at, for example, Business::ISBN:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/perl-isbn/Business/ISBN/ISBN.pm?rev=1.70&content-type=text/vnd.viewcvs-markup

That @EXPORT_OK array defines the names that get CAN get exported when someone does a use, like:

use Business::ISBN qw( is_valid_checksum );

The function is still Business::ISBN::is_valid_checksum, but there's (effectively) an alias to it from main::is_valid_checksum().

xoa
--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance

Reply via email to