I am new to Perl/Mason.
My url is https://www.myurl.com/myPar/2016image
which will return a png image.
In this url, myPar
is the parameter (equals to $orderViewHelper->{orderId}
).
I have created an orderViewHelper
which will hold myImage
object so I can access it in other classes. Is there a way that I can use $Std->url()
to get the image and put it into myImage?
$orderViewHelper->{myImage} = $Std->url(
'https://www.myurl.com/$orderViewHelper->{orderId}/2016image',
{ absolute =>1 }
);
I think this will work:
$orderViewHelper->{myImage} = $Std->url("https://www.myurl.com/$orderViewHelper->{orderId}/2016image", { absolute =>1 });