juo has asked for the wisdom of the Perl Monks concerning the following question:
I have been trying to re-write some VB OLE code into Perl but have some problems with function calls that use anobject variable. That variable will be set by the FindPart method in my example. I don't know how to create the "out" variables in Perl. Particular the line : if $Library->FindPart($placement->PlacementPart->Part->Name, $Part) is causing problems. Any ideas ?
VB CODE
Dim Part, FeederType If Library.FindPart (Recipe.Placements(0).PlacementPart.Part.Name, Par +t) Then FeederType = Part.Value ("FEEDERWIDTH", "Default value goes here") MsgBox "Feeder type: " & FeederType End If
Perl CODE
my ($Part, $FeederType); for my $placement (in $Recipe->Placements) { if $Library->FindPart($placement->PlacementPart->Part->Name, $Part +) { $FeederType = $Part->Value("FEEDERWIDTH", ""); } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Trying to re-write some VB-OLE into PERL-OLE
by Courage (Parson) on Sep 23, 2004 at 17:30 UTC | |
by juo (Curate) on Sep 24, 2004 at 04:32 UTC | |
Re: Trying to re-write some VB-OLE into PERL-OLE
by dragonchild (Archbishop) on Sep 23, 2004 at 13:41 UTC | |
by jdporter (Paladin) on Sep 24, 2004 at 00:18 UTC | |
by dragonchild (Archbishop) on Sep 24, 2004 at 00:25 UTC | |
by jdporter (Paladin) on Sep 24, 2004 at 00:56 UTC | |
by juo (Curate) on Sep 23, 2004 at 14:10 UTC | |
by dragonchild (Archbishop) on Sep 23, 2004 at 14:19 UTC |