|Don't ask to ask, just ask|
Catalyst Question: setting up new models in Catalystby dwm042 (Priest)
|on Sep 22, 2010 at 17:44 UTC||Need Help??|
dwm042 has asked for the
wisdom of the Perl Monks concerning the following question:
Easiest clean way to demonstrate the issue.
1. Install ubuntu server 10.04 or similar Debian based distro.
1a. sudo apt-get update ; sudo apt-get upgrade
2. Install catalyst
3. catalyst.pl testFileModel
4. Check to see that the development server works. Start with -r option.
5. Go to this site, which has a neat little Text File model.
6. Start adding content as per the article.
7. Once you add lib/testFileModel/Model/File.pm, check the debug output on the dev server. You will see this:
And at this point, as a beginner, I'm stuck. I wrote the author of the article, who has been pleasant and responsive, but his first suggestion was that the code was not in place. And not to pick on this particular model, but I've had this problem before, when I tried to use Catalyst::Model::Adaptor and add a non Catalyst Moose Class to a Catalyst project, getting the exact same error as above.
So I'm missing something, something simple, and I'm worried that #catalyst on irc.perl.org is as hostile to newb questions as #perl is reputed to be (I did see dhoss there, but he's asleep presently).
Questions that occur to me:
1. What can lead to that kind of error?
2. This config: how do I know that it works? If I built a Moose Class with one scalar, one array ref and one hash ref (that's it), applied Catalyst::Model::Adaptor and tried to populate the model with the configuration file, how do I know that it worked? Any easy way to confirm or test that?
Noob questions to be sure. But the tutorials leave out these kinds of issues.
I'd like to know how to get a model to "attach" to the Catalyst framework. And I'd like to know if it has been configured correctly, once attached.
Thanks for any help provided.David.