On Mon, 22 Aug 2005 10:41:15 -0600
Jim Cromie <[EMAIL PROTECTED]> wrote:

Hi Jim,

> >>From the point of view of Pod/Perldoc.pm there's no differences between 
> >>.pod or
> >.pm files or, more in general, between a generic file or Perl module.
> >For example, I can view the source of 'media.types' file shipped with LPW:
> >
> >     %> perldoc -m LWP::media.types
> >
> >The bug (or 'strange' behaviour if you prefere) I've noted is that
> >Pod/Perldoc.pm adds .pod extension to perldoc argument only under certain 
> >(and,
> >in this case, inconsistent) circumstances and still I don't understand why.
> >
> >  
> >
> I think the biggest reason is if you have both Foo.pm and Foo.pod
> your previous patch (I think) will prefer Foo.pod, making Foo.pm 
> unavailable.

I agree with this, but one can check also for Foo.pod after checking Foo.pm, not
disabling that at all.
Currently, if Foo.pm isn't found, there is no chanche to check also Foo.pod
again (in the same path).

Attached patch maintains precedence of .pm over .pod (in order to looking at the
code first with -m switch) but also check for .pod suffix then.

> this may also be reason for looking in pods/*

In general, putting pure pod under pod/pods dedicated directory is a good thing
(and IMHO it should be the rule) but is poorly documented and/or suggested.

Regards

        - Enrico

Attachment: Perldoc.pm-3.14-switchm2_patch
Description: Binary data

Reply via email to