[Rt-devel] Error: (perhaps you forgot to load "Module Name")?

Alan Blake ablake at timptech.com
Fri Dec 17 11:01:37 EST 2004


Hello,

I created a custom perl module called SelectAffiliate.pm which I added 
to the /rt2/lib/RT folder with the others.

I then created code to use the module, which I put in 
/rt2/WebRT/html/Elements

Now when this code is executed I get the following error:

**begin error**
error:  Can't locate object method "new" via package 
"RT::SelectAffiliate" (perhaps you forgot to load 
"RT::SelectAffiliate"?) at 
/usr/local/rt2/WebRT/html/Elements/SelectAffiliate line 29, <GEN22> line 29.

context:  ...
25:  %}
26:  </SELECT>
27:
28:  <%INIT>
29:  my $sa=new RT::SelectAffiliate ($session{'CurrentUser'});
30:  $sa->UnLimit;
31:  </%INIT>
32:
33:  <%ARGS>
...

code stack:
/usr/local/rt2/WebRT/html/Elements/SelectAffiliate:29
/usr/local/rt2/WebRT/html/Search/PickRestriction:18
/usr/local/rt2/WebRT/html/Search/Listing.html:106
/usr/local/rt2/WebRT/html/autohandler:60
**end error**


Do I somehow have to load the module in my environment before I can use 
it?

Any help / direction is greatly appreciated.

Alan


More information about the Rt-devel mailing list