Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Catalyst-Model-Validated example broken?

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


gc at riseup

Jun 12, 2009, 8:11 AM

Post #1 of 2 (587 views)
Permalink
Catalyst-Model-Validated example broken?

Hello,

wishing to use Moose type constraints to validate my actions input,
I eventually discovered examples/Catalyst-Model-Validated in the SVN
repository.

Does anyone use this code? If not, what are you using instead?

As it seems to be quite an elegant way to achieve my needs, despite
the apparent alpha status, I wanted to give it a try, but I ran into
a few problems.

1. there seems to be some inconsistency in it: both Makefile.PL and
POD reference the nonexistent Catalyst::Model::ValidatedAction
instead of Catalyst::Model::Validated

2. more importantly, after fixing this, running the test server with
Catalyst::Runtime 5.80005 fails with the following error, which
I was unfortunately not able to fix:

Couldn't instantiate component "MyApp::Model::User", COMPONENT()
method (from Catalyst::Model::Validated) didn't return an object-like
value (value was MyApp::Model::User). at script/myapp_server.pl line
55
Compilation failed in require at script/myapp_server.pl line 55.

3. using Class::MOP 0.85, the test suite fails.

Not only it outputs a bunch of deprecation warnings (which might be
the root of the other encountered problems... or not):

The compute_all_applicable_attributes method has been deprecated.
Use get_all_attributes instead.
at /usr/local/lib/perl/5.10.0/Class/MOP/Class.pm line 974

But 01-basic.t's test #12 fails:

Use of uninitialized value $value in length at
/home/intrigeri/tmp/spamker/examples/Catalyst-Model-Validated/blib/lib/Catalyst/Model/Validated.pm
line 190.

# Failed test at t/01-basic.t line 75.
# Structures begin differing at:
# $got->{baz}[0] = 'required'
# $expected->{baz}[0] = 'HashRef'
# Looks like you failed 1 test of 12.
t/01-basic.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/12 subtests

Any idea?

Bye,
--
Guillaume Chambriat <gc [at] riseup>


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


edencardim at gmail

Jun 12, 2009, 1:29 PM

Post #2 of 2 (537 views)
Permalink
Re: Catalyst-Model-Validated example broken? [In reply to]

On Fri, Jun 12, 2009 at 12:11 PM, Guillaume Chambriat<gc [at] riseup> wrote:
> wishing to use Moose type constraints to validate my actions input,
> I eventually discovered examples/Catalyst-Model-Validated in the SVN
> repository.
>
> Does anyone use this code? If not, what are you using instead?

This is an unmaintained oversimplification of how Reaction works. I
put the example up as proof-of-concept code. I believe castaway has
gone a bit further and integrated this into a production app.

--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com/ http://www.shadowcat.co.uk/servers/

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

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.