Skip Menu |

This queue is for tickets about the GD-Window CPAN distribution.

Report information
The Basics
Id: 69387
Status: open
Priority: 0/
Queue: GD-Window

People
Owner: efunneko [...] gmail.com
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: passThrough return value on first method call
Date: Mon, 11 Jul 2011 08:42:13 +1000
To: bug-GD-Window [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
When using the passThrough=>1 option, the first call to a passed-through method doesn't seem to give the return value from the underlying GD. For example the foo.pl below prints from GD directly: index='0' from Window: index='' from Window: index='2' where I expected index='1' in the middle. It looks like the AUTOLOAD() func makes the call to the new passthrough method, but doesn't return the return value from there.
#!/usr/bin/perl -w use strict; use GD; use GD::Window; my $im = GD::Image->new(100, 100); my $win = GD::Window->new($im, 0,0, 99,99, 0,0, 99,99, passThrough => 1); { my $index = $im->colorAllocate(0,0,0); print "from GD directly: index='$index'\n"; } { my $index = $win->colorAllocate(0,0,0); print "from Window: index='$index'\n"; } { my $index = $win->colorAllocate(0,0,0); print "from Window: index='$index'\n"; }
On Sun Jul 10 18:42:26 2011, user42@zip.com.au wrote: Show quoted text
> When using the passThrough=>1 option, the first call to a passed-through > method doesn't seem to give the return value from the underlying GD. > For example the foo.pl below prints > > from GD directly: index='0' > from Window: index='' > from Window: index='2' > > where I expected index='1' in the middle. > > It looks like the AUTOLOAD() func makes the call to the new passthrough > method, but doesn't return the return value from there. >
Thanks for doing the testing. I was on holiday last week and will try to close these bugs this week.