Drobnis, Mark <> wrote:
: Why does the use find the file and the require does not?
: 
: The Win32.pm is located in, C:\Perl\lib\Win32.pm
: 
: Can't locate Win32::OLE qw(in with) in @INC (@INC contains:
: /package0/filpods/loaders . C:\Program Files\ActiveState Komodo
: 3.1\dbgp\perllib C:\perl\lib C:\perl\site\lib C:\Program
: Files\ActiveState Perl Dev Kit 6.0\lib\ C:/Perl/lib C:/Perl/site/lib)
: at Y:\FILPODS\DB\loaders\factsheet_extract.pl line 30.
: 
: Code example cause error:
: 
: $win32ole = 'Win32::OLE qw(in with)';
: $winconst = "Win32::OLE::Const 'Microsoft Outlook'";

    The second argument of 'use' passes arguments to the modules
import() subroutine (or a an inherited import() sub). 'require'
does not do this. You need to call import() manually. These
should be equivalent.

use Win32::OLE qw(in with);

require Win32::OLE;
Win32::OLE->import( qw(in with) );

HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to