Re: [Perl-workflow-devel] in 1.32 add_config does not work for condition
Brought to you by:
jonasbn
From: Jonas B. N. <jo...@gm...> - 2009-04-17 13:49:36
|
Hi Sergei, Marvellous - sorry for breaking your end though. I will look into it ASAP. jonasbn On 17/04/2009, at 15.42, Sergei Vyshenski wrote: > Hi, > > Jim Brandt wrote: >> Could you add some tests to the test file you found that demonstrate >> this problem? It sounds like you may have already done this as part >> of >> your testing and it would be really helpful to have the tests. > > Yes, please find attached file, which runs ok with 0.31 and fails > with 1.32. > > Maybe the following could be of help. > > On the way from 0.31 to 1.32 a function _add_condition_config was > changed in such a way, that now it has one extra "foreach". And now > the arguments (which add_config passes to the _add_condition_config > function) happen to be _not_ compatible with this extra "foreach". > > All the best, Sergei > > > # -*-perl-*- > > use strict; > use lib 't'; > use TestUtil; > use constant NUM_TESTS => 3; > use Test::More; > use Test::Exception; > > plan tests => NUM_TESTS; > > require Workflow::Factory; > > my @conditions = ({ > name => 'HasUser', > class => 'TestApp::Condition::HasUser' > }); > > my @actions = ({ > name => 'TIX_NEW', > class => 'TestApp::Action::TicketCreate' > }); > > my $factory = Workflow::Factory->instance(); > > is( ref( $factory ), 'Workflow::Factory', > 'Return from instance() correct type' ); > > $factory->add_config( condition => \@conditions ); > lives_ok{$factory->get_condition('HasUser')}; > > $factory->add_config( action => \@actions ); > ok(exists $factory->{_action_config}, "action config added"); > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p_______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel |