ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl.net
perl.net
Returning arrays: Bug or misunderstanding?
by Henning Moeller-Nielsen other posts by this author
Dec 22 2004 10:27PM messages near this date
view in the new Beta List Site
Download | RE: Returning arrays: Bug or misunderstanding?
FRAMEWORK Hi

I ran into an error in a component I was building for test purposes. It appears that my lack
 of namespacing gave me my error and I am posting it here so other can know about it (and if
 it is a bug someone might tell me).

Two modules:

  #test1.pm
  package test1;
  use strict;
  
  =for interface
    static test1[] GetAll();
  =cut
  
  sub GetAll {
    return [];
  }

and

  #test2.pm
  package DG::test2;
  use strict;
  
  =for interface
    static DG.test2[] GetAll();
  =cut
  
  sub GetAll {
    return [];
  }

Trying to compile the first module (test1.pm) gives me this error:

plc --norunlib --target library --force test1.pm

System.ApplicationException: Can't locate type test1[]
   at PerlRuntime.Interpreter.GetType(Int32 x, String klass)
   at PerlRuntime.Interpreter.typeof(Int32 x, Int32 klass_, Int32& e, Int32& rt)System.NullR
eferenceException: Object reference not set to an instance of an object.

The other module (test2.pm) compiles without any problems.

I am using ActivePerl 809 and the PDK 6.0.0.

/Henning 
       
_______________________________________________
Perl.NET mailing list
Perl.NET@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Henning Moeller-Nielsen
Jan Dubois

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved