Stephen Goodman - 2003-05-22

The thread "call a perl object method from Obj-C" was very helpful, exactly what I'm trying to do.  now I have it functioning almost effectively, but I have 2 questions.  My code:

CBPerl *perlObject = [[CBPerl alloc] init];
CBPerlArray *downloads = [[CBPerlArray alloc] init];

[perlObject useModule: @"HTML::LinkExtor"];
[perlObject eval:@"$parser = HTML::LinkExtor->new();"];
CBPerlObject *parser = [perlObject namedObject:@"parser"];
[parser parse:@""];

downloads = [perlObject namedArray:@"links"];

1) - First, This code doesn't work.  downloads is being set to an NSCFNumber, not an array.  any idea why?

2) - I'm doing the running line by line in my obj-c files, like above. This is because when I create a Perl file, say, package myPerl, the compiler complains that my "use" files can't be found.  It's really weird.