Compile /Search/Chart not working

Hello,

I want to compile the chart GD::Image for latter use like this:

my $chart = $m->comp(’/Search/Chart’, Query => $Query, Console => 1, %ARGS);

And modified code in /Search/Chart like this:

<%METHOD Plot>
<%ARGS>
$plot => undef
$Console => 0
</%ARGS>
<%INIT>
my @types = (‘png’, ‘gif’);

RT::Logger->debug($Console);
for my $type (@types) {
$plot->can($type)
or next;

if($Console) { 
    return $plot; 
} else { 
    $r->content_type("image/$type"); 
    $m->out( $plot->$type ); 
    $m->abort(); 
} 

}

die "Your GD library appears to support none of the following image types: "
. join(’, ', @types);
</%INIT>

</%METHOD>

I thought that it will return me the GD::Image instance of $plot on
$m->comp(), but I get undefined.
How can I get the the $plot object from /Search/Chart script?

Regards

View this message in context: http://requesttracker.8502.n7.nabble.com/Compile-Search-Chart-not-working-tp58393.html