Skip Menu |

This queue is for tickets about the indirect CPAN distribution.

Report information
The Basics
Id: 47441
Status: resolved
Priority: 0/
Queue: indirect

People
Owner: Nobody in particular
Requestors: ilmari+cpan [...] ilmari.org
Cc:
AdminCc:

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



Subject: Doesn't trigger on last statement in script without trailing semicolon
ilmari@fenchurch:~$ perl -M-indirect -e 'package Banana; sub new {}; new Banana;' Indirect call of method "new" on object "Banana" at -e line 1. ilmari@fenchurch:~$ perl -M-indirect -e 'package Banana; sub new {}; new Banana' ilmari@fenchurch:~$ Reproduced with both 5.10.0-19ubuntu1 and 5.8.8-12ubuntu0.4 on x86_64-linux-gnu-thread-multi.
Le Lun. Jun. 29 12:54:18 2009, ilmari a écrit : Show quoted text
> ilmari@fenchurch:~$ perl -M-indirect -e 'package Banana; sub new {}; new > Banana;' > Indirect call of method "new" on object "Banana" at -e line 1. > ilmari@fenchurch:~$ perl -M-indirect -e 'package Banana; sub new {}; new > Banana' > ilmari@fenchurch:~$ > > Reproduced with both 5.10.0-19ubuntu1 and 5.8.8-12ubuntu0.4 on > x86_64-linux-gnu-thread-multi.
Yes, it's documented in the CAVEATS section (though the sentence might be unclear if you happened to miss it). Most likely won't fix, but I'll think about it a little more.
Show quoted text
> Yes, it's documented in the CAVEATS section (though the sentence might > be unclear if you happened to miss it). Most likely won't fix, but I'll > think about it a little more.
I'm pretty sure this could be addressed by using a source filter to append something at the end of the source. But given that this shortcoming has no implications in real life uses, the remedy sounds worse than the disease. So I'll just leave it as a documented caveat. Vincent.
It looks like this was fixed in 0.22 as a side-effect of a code simplification. Previously, the internal cache of indirect used to be cleared when the source string buffer changed, with the assumption that this never happened in the middle of building a method call. It seems that the semicolon automatically inserted by perl at the end of the source was breaking that assumption. Vincent.