]> git.vpit.fr Git - perl/modules/indirect.git/commit - indirect.xs
Handle __PACKAGE__ as object name correctly rt88428
authorVincent Pit <vince@profvince.com>
Thu, 5 Sep 2013 11:02:10 +0000 (13:02 +0200)
committerVincent Pit <vince@profvince.com>
Thu, 5 Sep 2013 11:18:48 +0000 (13:18 +0200)
commit07fb4eb28539b53578b1421e348c12c921d180f1
tree757ace9c53c4536b7d9ec86c37f154c31be30f36
parentfaa0984a60b4134d0556ed7e6225bf83ddfb5474
Handle __PACKAGE__ as object name correctly

__PACKAGE__ cannot appear as the object name for indirect calls, but it
can for direct ones. This could cause wrong reports of indirect calls
when the actual package name appeared later in the source, for instance
in a comment. This is fixed by looking for '__PACKAGE__' in the source
buffer when we already have a hit for the current package name, and by
keeping the first one of those two.

This fixes RT #88428.
indirect.xs
t/20-good.t
t/21-bad.t