Skip Menu |

This queue is for tickets about the Package-Constants CPAN distribution.

Report information
The Basics
Id: 97964
Status: new
Priority: 0/
Queue: Package-Constants

People
Owner: Nobody in particular
Requestors: perl [...] toby.ink
Cc:
AdminCc:

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



Subject: False positives.
Script: use strict; use warnings; use Package::Constants; sub random (){ rand(10) } say random; say random; say random; say "Found $_" for Package::Constants->list(__PACKAGE__) Sample output: 2.70781966698454 7.57814169951843 2.76819339991686 Found random But the sub it found is not a constant according to any sensible definition of the word "constant". B.pm is able to detect if a sub is a constant, for a *somewhat* better definition of the word "constant".
Sub::Identify has an is_constant_sub() function that seems to work fairly reliably.