Skip Menu |

This queue is for tickets about the Catalyst-Model-LDAP CPAN distribution.

Report information
The Basics
Id: 28752
Status: resolved
Priority: 0/
Queue: Catalyst-Model-LDAP

People
Owner: Nobody in particular
Requestors: kc9ddi [...] arrl.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Attribute Methods not Defined
Date: Wed, 8 Aug 2007 21:21:02 -0500
To: bug-Catalyst-Model-LDAP [...] rt.cpan.org
From: Patrick McDonnell <kc9ddi [...] arrl.net>
Hello - In my controller, I have code like this, where the ABEntry model is a Catalyst-Model-LDAP model, unmodified from whatever the helper script created: sub list : Local { my ( $self, $c ) = @_; my $mesg = $c->model('ABEntry')->search('(objectClass=someClass)'); $c->stash->{entries} = [$mesg->sorted('cn')]; $c->stash->{template} = 'addressbook/list.tt2'; } In my TT views, I used to be able to do something like: <ul> [% FOREACH entry IN entries %] <li>[% entry.cn %]</li> [% END %] </ul> Now, that doesn't work, failing with the following error message: undef error - Can't locate object method Catalyst::Model::LDAP::Entry::cn via package "Catalyst::Model::LDAP::Entry" In my TT template, if I replace [% entry.cn %] with [% entry.get_value('cn') %], the problem is resolved. However, that seems quite verbose, and it would be nice to have the behavior revert back to the way it was. Environment Info: perl, v5.8.8 built for x86_64-linux-gnu-thread-multi (Debian Etch) Catalyst::Model::LDAP version 0.15
What version of Template Toolkit are you using? It appears that there has been a change in how Template Toolkit handles nonexistent object methods between 2.14 and 2.19. Previously it would fallback but that no longer seems to be the case. I'm going to keep digging and work on a solution this weekend, but for the time being you can downgrade to Template Toolkit 2.14 to avoid the issue.
Subject: Re: [rt.cpan.org #28752] Attribute Methods not Defined
Date: Fri, 10 Aug 2007 13:38:38 -0500 (CDT)
To: bug-Catalyst-Model-LDAP [...] rt.cpan.org
From: "Patrick McDonnell" <kc9ddi [...] arrl.net>
I am using Template Toolkit 2.19, so I guess that's the problem. Thanks for pointing that out. Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28752 > > > What version of Template Toolkit are you using? > > It appears that there has been a change in how Template Toolkit handles > nonexistent object methods between 2.14 and 2.19. Previously it would > fallback but that no longer seems to be the case. > > I'm going to keep digging and work on a solution this weekend, but for > the time being you can downgrade to Template Toolkit 2.14 to avoid the > issue. >
I've added a fix for this, finally: http://dev.catalystframework.org/svnweb/Catalyst/revision/?rev=7443 Version 0.16 is on its way to CPAN. Please give it a try with a more recent version of Template Toolkit and let me know your results.