Skip to content

POD & CPAN funny

August 3, 2009
tags: , ,

File this under….

“you learn something new every day”

My last upload of MooseX::SingletonMethod produced a funny in the module documentation (POD) on CPAN. It was showing the same POD in both modules (MX::SM & MX::SM::Role).

And not only was it showing MX::SM::Role POD in both but when you selected source you would only see code for MX::SM!?

How very odd?? (and u can still see this when u click above 0.02 link).

Here is an important snippet of how the modules / POD looked… first for MooseX::SingletonMethod:

package MooseX::SingletonMethod;

...

1;

__END__

=head1 NAME

MooseX::SingletonMethod - Moose with Singleton Method facility.

...

and for MooseX::SingletonMethod::Role

package MooseX::SingletonMethod::Role;
...
  
1;

__END__

=head1 NAME

MooseX::SingletonMethod - Role providing Singleton Method option

...

Spot the mistake?

The last line shown in above module should be….

MooseX::SingletonMethod::Role - Role providing Singleton Method option

Opps… missed off the ::Role part 😦

I thought the CPAN docs were picked up from and assigned via package declaration… obviously not! Also the POD coverage tests didn’t spot anything either (perhaps it might have done if I completely foobar the POD name! )

Anyway… all’s well that ends well πŸ˜‰

/I3az/

Advertisement
2 Comments leave one →
  1. August 4, 2009 12:51 am

    Basically – for the perldoc command, you’re right.

    search.cpan.org however has its own (private, closed source) indexer that tries to be more clever about things. Usually this works. Occasionally, not so much.

    • August 13, 2009 2:14 pm

      ic… I didn’t check kobesearch.cpan.org (couldn’t find an option to view old modules) so its a case of search.cpan.org being too clever then πŸ˜‰

      PS. Matt – your comments are still getting caught in the spam filters 😦 Someone at WordPress / Askimet doesn’t like you for some reason!

      /I3az/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: