Very true.  I'd still like to know if anybody has a TT solution as the
DBIC objects are kinda nasty, but this will help me make progress in
the meantime.  Thanks!


On Thu, Mar 18, 2010 at 7:37 PM, Oleg Kostyuk <[email protected]> wrote:
> I think, this receipt could be useful:
>
> http://search.cpan.org/~ribasushi/DBIx-Class-0.08120/lib/DBIx/Class/Manual/Cookbook.pod#DBIx::Class_objects_with_Data::Dumper
>
> Of course, this is not direct answer to your question, but I'm sure
> that you can adopt it accordingly.
>
> 2010/3/18 Chris M <[email protected]>:
>> To give a little detail, I'm grabbing lots of related info from a DB
>> all in one query using DBIx::Class (DBIC).  I am passing the object(s)
>> directly to the stash for processing in TT so I don't have to iterate
>> through all that data, pick out the pieces, and store seemingly
>> redundant information.  This works very well when I know the layout of
>> the data.  In TT, I simply reference
>> stash_object.child.child.field_name.
>>
>> However, there are times when I'm unsure when I’ll have to iterate
>> over some children in one of the relationships.  Meaning the tree of
>> the data could look like
>> - Stash_object
>>  - Child
>>    - Child1
>>      - Field_name
>>    - Child2
>>      - Field_name
>>
>> I know various ways to view the source of the stash (Catalyst debug
>> page on error/die, Perl debugger, using Template::Plugin::Stash,
>> Data::Dumper, etc.), but all these seem to print out the *entire* DBIC
>> object in Perl.  This is easily 1000’s of lines and the information I
>> want to view is deeply nested in stuff I don’t care about, like all
>> the DBIx class info for all of my tables.
>>
>> TT obviously has a way of accessing these in a more simplified form.
>> Is there a way to view the stash as it can be accessed from TT, like
>> the tree above?
>>
>> Thanks in advance!
>> Chris
>>
>> _______________________________________________
>> templates mailing list
>> [email protected]
>> http://mail.template-toolkit.org/mailman/listinfo/templates
>>
>
>
>
> --
> Sincerely yours,
> Oleg Kostyuk (CUB-UANIC)
>

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to