Re: [Knowledge Base] First coherent release
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
Re: [Knowledge Base] First coherent release
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." > Do you have Config::Pod located somewhere? It's needed for the > PerlKB::Configuration::Pod module to work (and no, I don't have that > documented that I know of, yet - sorry). Yup, I found out about that one the hard way. :-) > Btw, thanks for trying it out -- especially since I don't have access to > Microsoft sysems :) Glad to help. BTW, Win32 is just my home system. All my real programming is done on *nix. Drew Taylor JA[P|m_p|SQL]H http://www.drewtaylor.com/ Just Another Perl|mod_perl|SQL Hacker mailto:[EMAIL PROTECTED] *** God bless America! ***
Re: [Knowledge Base] First coherent release
On Thu, Oct 11, 2001 at 11:25:43AM -0400, Drew Taylor wrote: > I feel a little stupid now that I actually read up on tying hashes. Had I > read Ch 14 of the Camel #3, I might have phrased my question in a better > way so as to not illuminate my inexperience with tying variables. :-) n/p :) > 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)? Do you have Config::Pod located somewhere? It's needed for the PerlKB::Configuration::Pod module to work (and no, I don't have that documented that I know of, yet - sorry). Btw, thanks for trying it out -- especially since I don't have access to Microsoft sysems :) > One final question, by using "our" you're restricting these modules to perl > 5.6.x. Is there any particular reason for this? From the looks of it, the > usage of our could easily be changed. Do you have plans to take advantage > of other 5.6 specific features? Either way it would be nice if you included > a "require 5.6.0;" in PerlKB.pm so that it would be immediately obvious to > the new user. I will include a `require 5.006;' I do make use of `use base', the three argument form of `open' and auto-vivification of file handles in addition to `our'. Can't think of any others right now. --jim
Re: [Knowledge Base] First coherent release
I feel a little stupid now that I actually read up on tying hashes. Had I read Ch 14 of the Camel #3, I might have phrased my question in a better way so as to not illuminate my inexperience with tying variables. :-) 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? One final question, by using "our" you're restricting these modules to perl 5.6.x. Is there any particular reason for this? From the looks of it, the usage of our could easily be changed. Do you have plans to take advantage of other 5.6 specific features? Either way it would be nice if you included a "require 5.6.0;" in PerlKB.pm so that it would be immediately obvious to the new user. At 03:06 AM 10/11/01 -0500, Jim Smith wrote: >On Thu, Oct 11, 2001 at 02:53:09AM -0400, Drew Taylor wrote: > > I've run into a WEIRD problem that I think is ActivePerl related. I've > > installed the PerlKB modules and added some debugging code to > > PerlKB::Store.pm. The short story is that I have to shift TWICE to get rid > > of the "PerlKB::Store"! This is with the latest ActivePerl which I just > > installed tonight. And to top it off, once the config href is populated I > > get an "illegal operation" error and no result. :-( My system is Win98 SE. > > > > Any ideas? This is just weird... > >*doh* yes. I should have caught it. The following change has been made to >cvs (< == old, > == new). Change the URL from -0.02.tar.gz to -0.03.tar.gz. > >% cvs diff Store.pm >Index: Store.pm >=== >RCS file: /cvsroot/perlkb/perlkb/lib/PerlKB/Store.pm,v >retrieving revision 1.4 >diff -r1.4 Store.pm >18c18 >< croak "No configuration" unless $self -> {config} -> {configuration} >-> isa("PerlKB::Configuration"); >--- > > croak "No configuration" unless $self -> {config} -> > {configuration} && $self -> {config} -> {configuration} -> >isa("PerlKB::Configuration"); >33c33 >< sub TIEHASH { return $_[0] -> new(@_); } >--- > > sub TIEHASH { return shift -> new(@_); } Drew Taylor JA[P|m_p|SQL]H http://www.drewtaylor.com/ Just Another Perl|mod_perl|SQL Hacker mailto:[EMAIL PROTECTED] *** God bless America! ***
Re: [Knowledge Base] First coherent release
On Thu, Oct 11, 2001 at 02:53:09AM -0400, Drew Taylor wrote: > I've run into a WEIRD problem that I think is ActivePerl related. I've > installed the PerlKB modules and added some debugging code to > PerlKB::Store.pm. The short story is that I have to shift TWICE to get rid > of the "PerlKB::Store"! This is with the latest ActivePerl which I just > installed tonight. And to top it off, once the config href is populated I > get an "illegal operation" error and no result. :-( My system is Win98 SE. > > Any ideas? This is just weird... *doh* yes. I should have caught it. The following change has been made to cvs (< == old, > == new). Change the URL from -0.02.tar.gz to -0.03.tar.gz. % cvs diff Store.pm Index: Store.pm === RCS file: /cvsroot/perlkb/perlkb/lib/PerlKB/Store.pm,v retrieving revision 1.4 diff -r1.4 Store.pm 18c18 < croak "No configuration" unless $self -> {config} -> {configuration} -> isa("PerlKB::Configuration"); --- > croak "No configuration" unless $self -> {config} -> {configuration} && $self -> >{config} -> {configuration} -> isa("PerlKB::Configuration"); 33c33 < sub TIEHASH { return $_[0] -> new(@_); } --- > sub TIEHASH { return shift -> new(@_); }
Re: [Knowledge Base] First coherent release
I've run into a WEIRD problem that I think is ActivePerl related. I've installed the PerlKB modules and added some debugging code to PerlKB::Store.pm. The short story is that I have to shift TWICE to get rid of the "PerlKB::Store"! This is with the latest ActivePerl which I just installed tonight. And to top it off, once the config href is populated I get an "illegal operation" error and no result. :-( My system is Win98 SE. Any ideas? This is just weird... C:\install\PerlKB-0.02\example>perl -v This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Binary build 629 provided by ActiveState Tool Corp. http://www.ActiveState.com Built 12:27:04 Aug 20 2001 PerlKB::Store.pm sub new { my $class = shift; $class = ref $class || $class; my $self = { }; #shift; carp("new called w/ @_"); print Dumper($self->{config}); } C:\install\PerlKB-0.02\example>perl test.pl new called w/ PerlKB::Store type File configuration PerlKB::Configuration=HASH(0 x176f0d8) document_root ../lib at test.pl line 10 $VAR1 = { 'PerlKB::Configuration=HASH(0x176f0d8)' => 'document_root', 'PerlKB::Store' => 'type', '../lib' => undef, 'File' => 'configuration' }; Can't call method "isa" on an undefined value at E:/Perl/site/lib/PerlKB/Store.p m line 29. At 12:09 AM 10/11/01 -0500, James G Smith wrote: >I've put together a tarball of the PerlKB modules: > >http://prdownloads.sourceforge.net/perlkb/PerlKB-0.02.tar.gz > >The example/ directory has a little script that shows how the store objects >work. The scripts/ directory has a perl script that starts up the >PerlKB::Shell monitor (modeled in a small way after the CPAN shell). > >Otherwise, it doesn't do a whole lot, but it's starting to come together. > >Project page: http://sourceforge.net/projects/perlkb/ >+-- >James Smith - [EMAIL PROTECTED] | http://www.jamesmith.com/ > [EMAIL PROTECTED] | > http://cis.tamu.edu/systems/opensystems/ >+-- Drew Taylor JA[P|m_p|SQL]H http://www.drewtaylor.com/ Just Another Perl|mod_perl|SQL Hacker mailto:[EMAIL PROTECTED] *** God bless America! ***
[Knowledge Base] First coherent release
I've put together a tarball of the PerlKB modules: http://prdownloads.sourceforge.net/perlkb/PerlKB-0.02.tar.gz The example/ directory has a little script that shows how the store objects work. The scripts/ directory has a perl script that starts up the PerlKB::Shell monitor (modeled in a small way after the CPAN shell). Otherwise, it doesn't do a whole lot, but it's starting to come together. Project page: http://sourceforge.net/projects/perlkb/ +-- James Smith - [EMAIL PROTECTED] | http://www.jamesmith.com/ [EMAIL PROTECTED] | http://cis.tamu.edu/systems/opensystems/ +--