[Rt-devel] Problem with autohandler callback

Todd Chapman rt at chaka.net
Wed Nov 24 10:47:04 EST 2004


I am trying to load some Perl modules using an autohandler
callback, similar to RTFM.

Here is the callback:

# cat /opt/rt3/local/html/Callbacks/RTx/AssetTracker/autohandler/Default

<%init>
use RTx::AssetTracker;
use RTx::AssetTracker::Assets;
use RTx::AssetTracker::Asset;
use RTx::AssetTracker::Types;
use RTx::AssetTracker::Type;
return(1);
</%init>


The library is found from the command line:

# perl -I/opt/rt3/local/lib -I/opt/rt3/lib -MRTx::AssetTracker -e 0
#

But when called through a Mason component:

System error
error:  	Error during compilation of /opt/rt3/local/html/Callbacks/RT/autohandler/Default:
Can't locate RTx/AssetTracker.pm in @INC (@INC contains: /opt/rt3/local/lib /opt/rt3/lib /var/www/perllib /usr/local/lib/perl5/5.8.3/i686-linux /usr/local/lib/perl5/5.8.3 /usr/local/lib/perl5/site_perl/5.8.3/i686-linux /usr/local/lib/perl5/site_perl/5.8.3 /usr/local/lib/perl5/site_perl . /srv/www/ /srv/www/lib/perl) at /opt/rt3/local/html/Callbacks/RT/autohandler/Default line 2.

Stack:
[/opt/rt3/local/html/Callbacks/RT/autohandler/Default:2]
[RTx/AssetTracker.pm:2]
[/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Interp.pm:534]
[/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Interp.pm:326]
[/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm:892]
[/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm:996]
[/opt/rt3/share/html/Elements/Callback:71]
[/opt/rt3/share/html/autohandler:212]
BEGIN failed--compilation aborted at /opt/rt3/local/html/Callbacks/RT/autohandler/Default line 2.

Stack:
[/opt/rt3/local/html/Callbacks/RT/autohandler/Default:2]
[/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Interp.pm:534]
[/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Interp.pm:326]
[/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm:892]
[/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm:996]
[/opt/rt3/share/html/Elements/Callback:71]
[/opt/rt3/share/html/autohandler:212]

context:  	
1:  	<%init>
2:  	use RTx::AssetTracker;
3:  	use RTx::AssetTracker::Assets;
4:  	use RTx::AssetTracker::Asset;
5:  	use RTx::AssetTracker::Types;
6:  	use RTx::AssetTracker::Type;
...  	
code stack:  	/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Interp.pm:327
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm:892
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm:996
/opt/rt3/share/html/Elements/Callback:71
/opt/rt3/share/html/autohandler:212


Any ideas?


Thanks!

-Todd


More information about the Rt-devel mailing list