in reply to Re: win32::ole module
in thread win32::ole module

#!perl #Script to build a project # Win32::OLE gives access to COM objects, # including the IDE’s COM objects use Win32::OLE; # Create an instance of CodeWarrior $CW = Win32::OLE->new("CodeWarrior.CodeWarriorApp",'Quit'); # Get the command line argument $projecttoopen = @ARGV[0]; # Open the project $project = $CW->File->Open($projecttoopen, true, 0, 0)|| die "can't op +en a project $!" # Build the project # Build() $project->Build(); # end of script

---> here, able to invoke the application. But $CW->File->Open fails with error message --Can't call method "Open" on an undefined value at build.pl line 23

-jaya

Janitored by holli - fixed formatting

Replies are listed 'Best First'.
Re^3: win32::ole module
by nobull (Friar) on May 30, 2005 at 14:14 UTC
    Well that tells us that $CW->File is returning undefined. Perhaps you should call $CW->File the examine Win32::OLE->LastError().