Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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:

require testFileModel::Model::File was successful but the package is n +ot defined. at /usr/share/perl5/Catalyst/Utils.pm line 287. [debug] Debug messages enabled [debug] Statistics enabled [debug] Loaded plugins:

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.

In reply to Catalyst Question: setting up new models in Catalyst by dwm042

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-24 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found