Hello:

On Sun, Dec 04, 2011 at 10:22:26AM +0000, Huub van Niekerk wrote:
> Thank you for your response. The variable is defined as:
> 
> my $ps = new PostScript::Simple(papersize => "A4",
>                                 colour => 0,
>                                 eps => 0,
>                                 units => "mm");
> 
> So I don't think that's the problem.

I'm not personally familiar with the PostScript::Simple module,
but I just looked it up on CPAN and it doesn't look like the
'new' method can fail to return a reference (aside from maybe out
of memory).

The error you're getting certainly does suggest that $ps is
undefined, however. Try using Data::Dumper to print it to be
sure.

Also, note that indirect-object notation is frowned upon,
so you should explicitly call the 'new' class method instead.
Make sure you're also using the 'strict' and 'warnings' pragmas
so that Perl can point out any subtle mistakes that you may have
made. :)

use strict;
use warnings;

use Data::Dumper;

my $ps = PostScript::Simple->new(papersize => 'A4',
                                 colour => 0,
                                 eps => 0,
                                 units => 'mm');

print Dumper $ps;

__END__

HTH,


-- 
Brandon McCaig <bamcc...@gmail.com> <bamcc...@castopulence.org>
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'

Attachment: signature.asc
Description: Digital signature

Reply via email to