GFL

 view release on metacpan or  search on metacpan

GFL/Image.pm  view on Meta::CPAN

Error reporting in LIST context

Here, you are testing for I<error>. You get a list with two values :

- first value is B<true> if the function B<failed>, false otherwise.

- second value is either an error string or the string C<'OK'>

e.g:

	@error = $a -> rotate(100);
	if ($error[0])
	{
		print STDERR $error[1];
	}

=item *

Error reporting in SCALAR context

Here, you are testing for I<Success>.
You get B<true> if the method B<succeeded>, false otherwise.

e.g:

	$a-> rotate(100) && $success++;


=item *

error reporting via B<LastError> attribute

In either SCALAR or LIST context, the B<LastError> attribute is always updated with
false or an error message after a method call.

As using C<get()> would also affect C<lasterror>, you must retrieve it via the special accessor C<-E<gt>lasterror>.

Thus, you can say:

	$b = $a -> get('dither');
	$errormsg = $a ->lasterror and print "couldn't get dither value : $errormsg\n";

=item *

error reporting on STDERR

See the L<Verbose> attribute if you want reports on STDERR.

=back

=head1 COPYRIGHT

copyright 2001
Germain Garand (germain@ebooksfrance.com)

This wrapper is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=head1 SEE ALSO

GD(3), Image::Magick(3)

=cut

1;



( run in 2.312 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )