I think it's time to back up. You had plain BeerDB working, go back to
that. Then write an empty base model, BeerDB::DBI, inheriting from
Maypole::Model::CDBI (note: not ::Plain). Use that as your model, see
if it works. Next, write basic model subclasses (without the
relationships code - still keep the original setup). See if that
works. Now move to ::Plain as the model. Keep going, one step at at
time, until you reach a block. You'll get there!

d.




On 11/12/05, Kieren Diment <[EMAIL PROTECTED]> wrote:
> I was hoping that this was my stupidity, but apparently not.  As a
> consequence I feel a little less stupid.
>
>   s/Beer::DBI/BeerDB::DBI/ doesn't help much:
>
> with Maypole::CLI as previously (perl  -I ../lib/ -
> MMaypole::CLI=BeerDB -e1 http://localhost/beer/beer/  2>&1)
>
> with the use  BeerDB::* in BeerDB.pm we get:
>
> Debugging enabled at /Library/Perl/5.8.6/Maypole/Application.pm line 24.
> Couldn't require BeerDB - Can't use string ("BeerDB::Beer") as a HASH
> ref while "strict refs" in use at /Library/Perl/5.8.6/Class/Accessor/
> Fast.pm line 39.Compilation failed in require at ../lib//BeerDB.pm
> line 9.BEGIN failed--compilation aborted at ../lib//BeerDB.pm line
> 9.Compilation failed in require at /Library/Perl/5.8.6/Maypole/CLI.pm
> line 22.BEGIN failed--compilation aborted.Can't call method
> "class_of" on an undefined value at /Library/Perl/5.8.6/Maypole.pm
> line 83.CHECK failed--call queue aborted.
>
> without  "use BeerDB::*" commented out we  get:
>
> Couldn't require BeerDB - Can't locate object method "table" via
> package "BeerDB::Beer" (perhaps you forgot to load "BeerDB::Beer"?)
> at /Library/Perl/5.8.6/Maypole/Model/CDBI/Plain.pm line 9.
> Compilation failed in require at /Library/Perl/5.8.6/Maypole/CLI.pm
> line 22.
> BEGIN failed--compilation aborted.
>
> I tried another tack and instead of the use BeerDB::* statements in
> BeerDB.pm I tried (an ugly hack):
>
> warn "Doing it";
> do "BeerDB/DBI.pm" or die "couldn't do it $@";
>
> which results in the following error:
>
> Debugging enabled at /Library/Perl/5.8.6/Maypole/Application.pm line 24.
> Doing it at ../lib//BeerDB.pm line 8.
> Couldn't require BeerDB - Can't use string ("BeerDB::Beer") as a HASH
> ref while "strict refs" in use at /Library/Perl/5.8.6/Class/Accessor/
> Fast.pm line 38.
> Compilation failed in require at /Library/Perl/5.8.6/Maypole/CLI.pm
> line 22.
> BEGIN failed--compilation aborted.
>
> ...
> Quick trip to cpan to upgrade Class::Accessor and Class::DBI hasn't
> helped
> ...
>
> Cheers
>
> kd
>
> On 13 Nov 2005, at 00:42, David Baird wrote:
>
> > On 11/11/05, Kieren Diment <[EMAIL PROTECTED]> wrote:
> >> OK, we're getting somewhere.   I like this.  It's kind of an exercise
> >> in hardcore empiricism.
> >>
> >> That's in the sense that we change lots of stuff and it makes no
> >> difference except to the internal elegance of the externality of
> >> which we are mere observers (!).
> >>
> >> So I think I've done what you've said.  (except I'm leaving step
> >> three until I get a different error message).
> >>
> >> In the mean time I've also worked out how to use Maypole::CLI (like I
> >> say, I work slowly).
> >>
> >> So, now I've got a tar ball of the whole thing (attached).
> >>
> >> I chdir to  ./templates and run:
> >>
> >> perl  -I ../lib/ -MMaypole::CLI=BeerDB -e1 http://localhost/beer/
> >> 2>&1 | less
> >>
> >> and get the following output (that's with the use BeerDB::* statments
> >> included):
> >>
> >>
> >> Debugging enabled at /Library/Perl/5.8.6/Maypole/Application.pm
> >> line 24.
> >> Couldn't require BeerDB - Can't locate Beer/DBI.pm in @INC (@INC
> >> contains: ../li
> >
> > Your model is BeerDB::DBI, not Beer::DBI
> >
> > d.
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's Geronimo App Server.
> > Download
> > it for free - -and be entered to win a 42" plasma tv or your very own
> > Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> > _______________________________________________
> > Maypole-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/maypole-devel
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Maypole-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/maypole-devel
>


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel

Reply via email to