MasonX::Profiler

How do I enable MasonX::Profiler?

I have installed it via CPAN.

bash-3.00$ grep Mason RT_SiteConfig.pm

@MasonParameters is the list of parameters for the constructor of

HTML::Mason’s Apache or CGI Handler. This is normally only useful

(preamble => ‘my $p = MasonX::Profiler->new($m, $r);’);

#@MasonParameters = () unless (@MasonParameters);
@MasonParameters = (preamble => ‘my $p = MasonX::Profiler->new($m, $r);’);

When I goto my RT installation, I get the following error:

Can’t locate object method “new” via package “MasonX::Profiler” (perhaps you forgot to load “MasonX::Profiler”?) at /home/rt/rt/var/mason_data/obj/standard/autohandler line 7.

Trace begun at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/Exceptions.pm line 131
HTML::Mason::Exceptions::rethrow_exception(‘Can’t locate object method “new” via package “MasonX::Profiler” (perhaps you forgot to load “MasonX::Profiler”?) at /home/rt/rt/var/mason_data/obj/standard/autohandler line 7.^J’) called at /home/rt/rt/var/mason_data/obj/standard/autohandler line 7
HTML::Mason::Commands::ANON(‘id’, 1880) called at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x943c05c)’, ‘id’, 1880) called at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/Request.pm line 1069
eval {…} at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, undef, ‘id’, 1880) called at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/Request.pm line 338
eval {…} at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/Request.pm line 338
eval {…} at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/Request.pm line 297
HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x93ae348)’) called at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm line 134
eval {…} at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm line 134
HTML::Mason::Request::ApacheHandler::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x93ae348)’) called at /home/rt/local-perl/lib/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm line 792
HTML::Mason::ApacheHandler::handle_request(‘HTML::Mason::ApacheHandler=HASH(0x9340540)’, ‘Apache=SCALAR(0x9340384)’) called at /home/rt/rt/bin/webmux.pl line 127
eval {…} at /home/rt/rt/bin/webmux.pl line 127
RT::Mason::handler(‘Apache=SCALAR(0x9340384)’) called at /dev/null line 0
eval {…} at /dev/null line 0

Thanks,
Stan

bash-3.00$ grep Mason RT_SiteConfig.pm

@MasonParameters is the list of parameters for the constructor of

HTML::Mason’s Apache or CGI Handler. This is normally only useful

(preamble => ‘my $p = MasonX::Profiler->new($m, $r);’);

#@MasonParameters = () unless (@MasonParameters);
@MasonParameters = (preamble => ‘my $p = MasonX::Profiler->new($m, $r);’);

Well, the RT_Config.pm did say:

use MasonX::Profiler; # available on CPAN

right above the preamble line. So just uncommenting that line and put
it to RT_SiteConfig.pm will do. :slight_smile:

Alternatively, add this line:

PerlModule MasonX::Profiler

in your httpd.conf.

Thanks,
/Autrijus/