On Thu, Oct 11, 2001 at 01:05:17PM -0400, Drew Taylor wrote:
> At 11:45 AM 10/11/01 -0500, Jim Smith wrote:
> >On Thu, Oct 11, 2001 at 11:25:43AM -0400, Drew Taylor wrote:
> > > I assume that the reason I get the "Can't locate the render_format method"
> > > is because you're not actually storing any objects yet?
> >
> >  Not sure.  It should be able to see it.  Can you give me the line number
> >  or any other context for it?  Is it version 0.03 (the changes I mentioned
> >  in the previous e-mail)?
> 
> Yes, I did add the changes you mentioned in the previous email althought I 
> did not DL the new tarball. Let me try that...
> Interesting... I DL the newest taball. Now I get a bunch of code scrolling 
> by (stupid DOS prompt...) which I guess is the sample.doc. But I still get 
> the error:
> 
> "Can't locate object method "render_format" via package 
> "PerlKB::Document::pod" (
> perhaps you forgot to load "PerlKB::Document::pod"?) at test.pl line 40."

 ok - I think I know what the problem is.

 The PerlKB::Document object accepts a `type' argument on creation and
 tries to load the corresponding module.  If it is successful, then it
 bless's the current document object (being created) into that
 class/module.

 I think DOS/Windows is presenting a case-insensitive filesystem and thus
 PerlKB::Document::pod loads, but is really PerlKB::Document::Pod.  The
 PerlKB::Document code tries qw(pod POD Pod) in that order and stops with
 the first successful load.  This is regardless of the capitalization of
 `type'.  This was made this way to allow differences in actual and
 expected capitalization (e.g., qw(html HTML Html)).  This side effect on
 case-insensitive filesystems should be viewed as a bug.  I'll try and
 figure out a fix that can still be flexable enough to not require prior
 knowledge of modules (within PerlKB::Document) and allow for
 capitalization varients.

 If I can't think of a good way around this, I'll ditch it and require
 proper capitalization of the `type' parameter.

--jim

Reply via email to