On Thu, 2003-12-11 at 14:06, drieux wrote:
> On Dec 10, 2003, at 11:34 PM, Joel Newkirk wrote:
> [..]
> > I found my problem - apparently webmin was doing "use GDBM_File;" for
> > me, which is why it worked in the webmin module, and since I wasn't
> > including either that or the webmin "web-lib.pl" it was defaulting to a
> > different DB format, hence the "File Not Found" error.  Once I include
> > "Use GDBM_File;" I can successfully read the DBM written by the webmin
> > module.  Doh!  Maybe my second week with Perl will be smoother... ;^)
> [..]
> 
> p0: if you want to have 'compatibility' with webmin,
> you might work out whether or not you too should be
> 'sourcing in' their web-lib.pl information as a way
> to keep your 'basics' consistent with theirs.

I'd rather not depend on the webmin lib for the console command, I'd
like it to be a 'standalone' tool.  In the webmin module that covers 
similar functionality (albeit interactively) I use "web-lib.pl" in
order to get the HTML and CGI extras, with HTML headers and such 
matched to the current webmin theme, and webmin's access control
system that lets me control which users have access to the module.

> p1: thanks for explaining that you were planning
> on actually using that foo.dbm to create the
> 
>       foo.dbm.pag
>       foo.dbm.dir
> 
> even if that makes me go YIKES! may I recommend
> that you adopt the naming strategy
> 
>       foo_dbm
> 
> so as not to scare 'old guys'....

Old Guys... Hah...  :^)  Actually, I've changed it to remove the "dbm"
completely, just calling it "rules" within the program, and thus the
files actually created are "rules.pag" and "rules.dir".

> p2: You might also want to look at
> 
>       use SDBM_File;
> 
> which is a db format that comes with Perl
> and is actually a bit More ubiquitous than
> the GDBM_File format, which assumes that the
> build out of perl already had the underlying
> gdbm libraries.

Well, actually I misspoke, and SDBM is what I've used, and doing so
causes it to create the two files noted when I specify "rules.dbm".

> p3: It all goes down hill from here...
> 
> Since of course I will go back to my
> general recommendation to heed the warning
> and shift to 'tie' . That way of course
> would lead you into creating your own
> stand alone DB Abstraction Layer, where you
> hide from yourself and the rest of the system
> what you are doing with the 'db stuff' - and
> since you will be building that out using
> h2xs to correctly form up your perl modules,
> it will be all so much easier.....

I'll probably be doing so sometime early next week.  (IE, you can look
forward to more questions from me around then... [grin])

> p4: and on the 3rd week of perl programming.....

I have to get there first.  ;^)

> ciao
> drieux

j

-- 
"Not all those who wander are lost."  - JRR Tolkien


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to