I'd have to ask, what do you need the hash for? If you really do need a hash, then yes, why are you using CDBI? Ideally you want to use the object, not the hash.
Well, now you mention it. HTML::Template takes hashes, Data::FormValidate returns hashes, HTML::FillInForm takes hashes, or these tajke hashrefs, whatever. But it seems that everything I am using for validation and output wants hashes. So, indeed, why am I using Class::DBI. Class::DBI was represented as being "the way" to handle data intensive web-apps. But I am beginning to doubt that now. For small databases, few fields (some of my tables have 100-120 fields) and few relationships Class::DBI is great (my test application for example!), but as I have tried to move it into the big league here it is suffering.
I am quite prepared for someone to tell me it is me that doesn't know how to do things, I am totally new at OO Perl! But I think I am wasting too much time trying to get CDBI shoe-horned into my app right now.
jdtoronto
-
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.
|