Re: [Catalyst] Question on an exception; seems related to autocrud?

2010-02-02 Thread Nick Perez
On Tue, 2 Feb 2010 17:24:14 -0500
"Ken Beal"  wrote:

> Please let me know if the rest of the output (or a specific portion of
> it) would help in determining the root cause.

Just a note, but the full stack trace is usually what is needed for
people to properly diagnose a problem. If you feel it is unusually
long, you can also take advantage of one of the nopaste servers, a gist
at github, or host a text file somewhere. Then just provide a link into
your email.


-- 

Nicholas Perez
XMPP/Email: n...@nickandperla.net
http://search.cpan.org/~nperez/
http://github.com/nperez

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Question on an exception; seems related to autocrud?

2010-02-02 Thread Ken Beal
Hi all,

 

I'm working on a Catalyst app; currently in the early stages.  I'm also
learning the framework, so this may be a beginner question.

 

I started this app by defining the database tables, then creating a .sql
file, and using that to import to sqlite3 (I was following along in the
tutorial, for the most part).  To verify everything was working, I added
autocrud, so I could watch the changes as I made them, including doing
some INSERTs to pre-populate the tables.  Nothing fancy.

 

Then I create a "list" page (similar to "books/list", although in my
case it's "builds/list"), updated the code to extract "all" (builds
instead of books), and tested it.  It worked fine, or so I thought; each
time I tested it, I first went to the autocrud page to verify the data,
and then loaded the list page.

 

Today, I restarted the server and then tried refreshing the
"builds/list" page.  I got an exception, with lots of output.  Rather
than including the entire output here, I'll just say that it started
with the following, which is what leads me to believe it's somehow
related to autocrud (and the other evidence that reloading any of the
autocrud pages makes the "builds/list" page work again).

 

Caught exception in SubmitBuild::View::AutoCRUD::JSON->process "must
provide object to convert at C:/Perl/site/lib/Catalyst/View/JSON.pm line
43"

 

Please let me know if the rest of the output (or a specific portion of
it) would help in determining the root cause.

 

Thanks,

--
Ken Beal
Senior Software Engineer, Build/Release

Cross Country Automotive Services
One Cabot Road
Medford, MA 02155
p: (781) 306-3605
m: (978) 423-8977
e: kb...@crosscountry-auto.com

 


Confidentiality Note: This e-mail message and any attachments may contain 
confidential or privileged information. If you are not the intended recipient, 
please notify me immediately by replying to this message and destroy all 
copies of this message and any attachments. Thank you.
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: Catalyst/C:M:Adaptor/Moose/Moosex::Declare bug?

2010-02-02 Thread iain

iain hubbard wrote:
On 28 January 2010 11:22, iain > wrote:


iain wrote:

Hi all,

This is probably going to end up being nothing to do with
catalyst but as this is where I am seeing the problem its
where im starting.

I have a standalone set of objects that work as expected. When
I wrap these with Catalyst::Model::Adaptor for use as a model
they fail with the error. http://pastebin.com/m2e87571c (this
is a simple test app to highlight the problem)

The cat app that generates this error is here
http://tinyurl.com/y9vyfmz. I have included two tests one that
passes (standalone) and the normal 01app.t test that fails.
Just unzip and "prove -l t".

I am using the latest CPAN versions of Catalyst (5.80018),
Catalyst::Model::Adaptor (0.06),  Moose (0.94),
MooseX::Declare (0.32) and the Perl version is 5.10.0 on ubuntu.

Hopefully somebody with more knowledge of the inner workings
can shed some light on the problem.


Now that i have finished reading all the responses to my first
post :) I have had time to de MooseX::Declare my objects. This
fixes the problem.

So, this is a problem with Moosex::Decalre and
Catalyst/Catalyst::Model::Adaptor.


For anybody thats interested this problem appears to be caused by 
Catalyst::Plugin::Static::Simple specifically version 0.28. Removing 
this plugin or rolling back to 0.26 makes the error go away.


So, if you have a MooseX::Declare style object that loads a class at 
runtime and you wrap it as a catalyst model and you use 
C:P:Static::Simple it will error :-)

For the archives.

This is now fixed by Catalyst::Plugin::Static::Simple 0.29 and was 
caused by the use of override in a Moose role.


Thanks for the help in IRC.

fade++
t0m++
mst++

Iain Hubbard.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Change user password

2010-02-02 Thread Nigel Metheringham
On 1 Feb 2010, at 21:09, Bogdan Lucaciu wrote:
> Considering you just want to check the password and not reauthenticate
> the user, using check_password is less overhead, saves you a trip to
> the database,  and it's probably cleaner.
> 
> Otherwise I doubt there's any side-efect in calling $c->authenticate
> directly, and the performance overhead is probably not important, as
> you would probably need to run this code quite rarely. And it's
> probably more readable for people not knowing the Authentication
> internals

Its worth pointing out that
http://search.cpan.org/perldoc?Catalyst::Plugin::Authentication::Internals
does not document the check_password method, and so those
implementing credentials may not implement it.

I'd go with $c->authenticate as it is a documented route into the
API and should be handled by all credential modules.

Nigel.
--
[ Nigel Metheringham nigel.methering...@intechnology.com ]
[ - Comments in this message are my own and not ITO opinion/policy - ]


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/