Skip Menu |
 

This queue is for tickets about the pmtools CPAN distribution.

Report information
The Basics
Id: 52850
Status: resolved
Priority: 0/
Queue: pmtools

People
Owner: MLFISHER [...] cpan.org
Requestors: jpierce [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.10
  • 1.20
Fixed in: (no value)



Subject: [patch] flag constants in pmeth
Download (untitled) / with headers
text/plain 150b
Please find attached a patch incorporating code from L<constant> to flag routines as such. Flagging XS constants would also be nice, but C-fu is weak.
Subject: constant.patch
Download constant.patch
text/x-diff 934b
--- /usr/local/bin/pmeth 2009-12-16 20:21:25.000000000 -0500 +++ pmeth 2009-12-16 21:21:09.000000000 -0500 @@ -24,6 +24,8 @@ return; } foreach $name ( sort keys %{ $module . "::" } ) { + print '[constant] ' if declared($module . "::" . $name); + if (defined &{ $module . "::" . $name } ) { print "[overridden] " if $got_def{$name}++; if (@indirect) { @@ -40,6 +42,15 @@ } } +sub declared ($) { + use constant 1.01; # don't omit this! + my $name = shift; + $name =~ s/^::/main::/; + my $pkg = caller; + my $full_name = $name =~ /::/ ? $name : "${pkg}::$name"; + $constant::declared{$full_name}; +} + exit ($errors != 0); __END__ @@ -73,6 +84,9 @@ [overridden] new via IO::Handle +Constants declared via L<constant> have a leading "[constant]" added +to the output, but XS C<define>'s are not yet so flagged. + =head1 EXAMPLES $ pmeth IO::Socket
Resolved in pmtools v1.30.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.