perl-workflow-devel Mailing List for Perl Workflow (Page 11)
Brought to you by:
jonasbn
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(12) |
Feb
|
Mar
(4) |
Apr
|
May
(1) |
Jun
(11) |
Jul
(10) |
Aug
(7) |
Sep
(16) |
Oct
(2) |
Nov
(4) |
Dec
(11) |
2008 |
Jan
(1) |
Feb
(1) |
Mar
(9) |
Apr
(19) |
May
(3) |
Jun
(4) |
Jul
|
Aug
(8) |
Sep
(1) |
Oct
(6) |
Nov
(13) |
Dec
(17) |
2009 |
Jan
(5) |
Feb
(2) |
Mar
(3) |
Apr
(17) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(14) |
Oct
(2) |
Nov
|
Dec
(13) |
2010 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(4) |
Sep
(3) |
Oct
|
Nov
(10) |
Dec
|
2011 |
Jan
(8) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(6) |
Nov
(7) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(4) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: jonasbn <jo...@gm...> - 2007-08-12 11:27:59
|
Hi Jim, Thanks very much for the patch. I made a branch in an attempt to apply it, so after some attempts I got around to actual patching (I should not work when I am tired), anyway I am experiencing some problems with your patch, which I attempt to apply the following way: hyperstation ~/Desktop/Workflow-0.28 % patch -p2 <dateformat.patch patching file lib/Workflow/Action/InputField.pm Hunk #1 FAILED at 17. 1 out of 1 hunk FAILED -- saving rejects to file lib/Workflow/Action/ InputField.pm.rej patching file lib/Workflow/Persister/DBI.pm Hunk #1 FAILED at 17. Hunk #2 FAILED at 47. Hunk #3 FAILED at 188. Hunk #4 FAILED at 254. Hunk #5 FAILED at 268. Hunk #6 FAILED at 298. Hunk #7 FAILED at 373. Hunk #8 FAILED at 535. Hunk #9 succeeded at 713 with fuzz 2. 8 out of 9 hunks FAILED -- saving rejects to file lib/Workflow/ Persister/DBI.pm.rej patching file t/TestUtil.pm Hunk #1 FAILED at 95. 1 out of 1 hunk FAILED -- saving rejects to file t/TestUtil.pm.rej patching file t/persister_dbi.t Hunk #1 FAILED at 5. Hunk #2 FAILED at 18. Hunk #3 FAILED at 25. Hunk #4 FAILED at 38. Hunk #5 FAILED at 56. Hunk #6 FAILED at 64. Hunk #7 FAILED at 95. Hunk #8 FAILED at 106. 8 out of 8 hunks FAILED -- saving rejects to file t/persister_dbi.t.rej hyperstation ~/Desktop/Workflow-0.28 I went away from the branch and attempted to work on a unpacked release tar-ball instead, but I get the same errors. I had to correct a few lines in your patch since some of the lines were broken into two lines. -my $parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d %H:%M' ); Should be one line I believe. If you can send me the same patch as an attachment it would be appreciated. Any other suggestions or advice? jonasbn -- AIM: BjonasN Gtalk: jo...@gm... ICQ: 62401545 MSN: jo...@io... On 10/08/2007, at 19.13, Jim Brandt wrote: > Hello, > > Pasted below is a patch that allows you to pass in a date format for > Persister::DBI. A few notes: > > * It perpetuates the issue I brought up with subclassing I mentioned > before since you need to set up date_format and parser in your own > init > if you subclass Persister::DBI and don't call SUPER::init. > > * I think a took care of a few warnings from the TODO: > > - Eliminate warnings from DBD::Mock > > should be fixed > > - Investigate failings tests in t/persister_dbi.t, > > Yes, this was related to dates. $NOW was set at the top of the file > and > then used throughout, so the time could be off by the end of the file. > This was easy to see in the debugger if you stopped the program for a > while and then continued. > > I improved it by putting the actual code in each call when the date is > needed, but I think this issue can still come up if the second flips > while running. It should be less likely now. > > I didn't update any versions. Let me know if you can use the diff for > some reason. > > Thanks, > Jim > > > > diff -urX workflow.exclude > orig/Workflow-0.28/lib/Workflow/Action/InputField.pm > working/Workflow-0.28/lib/Workflow/Action/InputField.pm > --- orig/Workflow-0.28/lib/Workflow/Action/InputField.pm 2007-07-06 > 10:43:11.000000000 -0400 > +++ working/Workflow-0.28/lib/Workflow/Action/InputField.pm 2007-08-10 > 11:35:40.000000000 -0400 > @@ -17,7 +17,8 @@ > sub new { > my ( $class, $params ) = @_; > my $log = get_logger(); > - $log->debug( "Instantiating new field '$params->{name}'" ); > + $log->debug( "Instantiating new field '$params->{name}'" ) > + if $params->{name}; > > my $self = bless( {}, $class ); > > diff -urX workflow.exclude > orig/Workflow-0.28/lib/Workflow/Persister/DBI.pm > working/Workflow-0.28/lib/Workflow/Persister/DBI.pm > --- orig/Workflow-0.28/lib/Workflow/Persister/DBI.pm 2007-07-06 > 10:43:11.000000000 -0400 > +++ working/Workflow-0.28/lib/Workflow/Persister/DBI.pm 2007-08-10 > 12:49:31.000000000 -0400 > @@ -17,11 +17,10 @@ > $Workflow::Persister::DBI::VERSION = '1.19'; > > my @FIELDS = qw( handle dsn user password driver > - workflow_table history_table ); > + workflow_table history_table date_format parser); > __PACKAGE__->mk_accessors( @FIELDS ); > > my ( $log ); > -my $parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d > %H:%M' ); > my @WF_FIELDS = (); > my @HIST_FIELDS = (); > > @@ -48,10 +47,16 @@ > $log->info( "Assigned workflow table '", $self- > >workflow_table, "'; ", > "history table '", $self->history_table, "'" ); > > - for ( qw( dsn user password ) ) { > + # Default to old date format if not provided so we don't break > old > configurations. > + $self->date_format( '%Y-%m-%d %H:%M' ); > + > + for ( qw( dsn user password date_format ) ) { > $self->$_( $params->{ $_ } ) if ( $params->{ $_ } ); > } > > + my $parser = DateTime::Format::Strptime->new( pattern => > $self->date_format ); > + $self->parser($parser); > + > my $dbh = eval { > DBI->connect( $self->dsn, $self->user, $self->password ) > || die "Cannot connect to database: $DBI::errstr"; > @@ -183,7 +188,7 @@ > my @fields = @WF_FIELDS[1,2,3]; > my @values = ( $wf->type, > $wf->state, > - DateTime->now->strftime( '%Y-%m-%d %H:%M' ) ); > + DateTime->now->strftime( $self->date_format() ) ); > my $dbh = $self->handle; > > my $id = $self->workflow_id_generator->pre_fetch_id( $dbh ); > @@ -249,7 +254,7 @@ > my $row = $sth->fetchrow_arrayref; > return undef unless ( $row ); > return { state => $row->[0], > - last_update => $parser->parse_datetime( $row->[1] ), }; > + last_update => $self->parser->parse_datetime( $row-> > [1] ), }; > } > > sub update_workflow { > @@ -263,7 +268,7 @@ > WHERE $WF_FIELDS[0] = ? > }; > $sql = sprintf( $sql, $self->workflow_table ); > - my $update_date = DateTime->now->strftime( '%Y-%m-%d %H:%M' ); > + my $update_date = DateTime->now->strftime( $self->date_format > () ); > > if ( $log->is_debug ) { > $log->debug( "Will use SQL\n$sql" ); > @@ -293,7 +298,7 @@ > my $id = $generator->pre_fetch_id( $dbh ); > my @fields = @HIST_FIELDS[1..6]; > my @values = ( $wf->id, $h->action, $h->description, $h- > >state, > - $h->user, $h->date->strftime( '%Y-%m-%d %H:% > M' ) ); > + $h->user, $h->date->strftime( > $self->date_format() ) ); > if ( $id ) { > push @fields, $HIST_FIELDS[0]; > push @values, $id; > @@ -368,7 +373,7 @@ > description => $row->[3], > state => $row->[4], > user => $row->[5], > - date => $parser->parse_datetime( $row->[6] ), > + date => $self->parser->parse_datetime( $row-> > [6] ), > }); > $log->is_debug && > $log->debug( "Fetched history object '$row->[0]'" ); > @@ -530,6 +535,15 @@ > > Password for C<user> to login with. > > +=item B<date_format> > + > +Date format to use when working with the database. Accepts a > format string > +that can be processed by the DateTime module. See > +L<http://search.cpan.org/~drolsky/DateTime-0.39/lib/ > DateTime.pm#strftime_Specifiers> > +for the format options. > + > +The default is '%Y-%m-%d %H:%M' for backward compatibility. > + > =item B<workflow_table> > > Table to use for persisting workflow. Default is 'workflow'. > @@ -699,4 +713,4 @@ > > Chris Winters E<lt>ch...@cw...E<gt>, original author. > > -=cut > \ No newline at end of file > +=cut > diff -urX workflow.exclude orig/Workflow-0.28/t/TestUtil.pm > working/Workflow-0.28/t/TestUtil.pm > --- orig/Workflow-0.28/t/TestUtil.pm 2007-07-06 10:43:11.000000000 > -0400 > +++ working/Workflow-0.28/t/TestUtil.pm 2007-08-10 > 11:31:31.000000000 -0400 > @@ -95,6 +95,7 @@ > name => 'TestPersister', > class => 'Workflow::Persister::DBI', > dsn => 'DBI:Mock:', > + user => 'DBTester', > ); > $factory->add_config( persister => [ \%persister ] ); > } > diff -urX workflow.exclude orig/Workflow-0.28/t/persister_dbi.t > working/Workflow-0.28/t/persister_dbi.t > --- orig/Workflow-0.28/t/persister_dbi.t 2007-07-06 > 10:43:11.000000000 -0400 > +++ working/Workflow-0.28/t/persister_dbi.t 2007-08-10 > 11:27:49.000000000 -0400 > @@ -5,7 +5,7 @@ > use strict; > use lib 't'; > use TestUtil; > -use constant NUM_TESTS => 41; > +use constant NUM_TESTS => 43; > use Test::More; > > eval "require DBI"; > @@ -18,7 +18,6 @@ > > my $TICKET_CLASS = 'TestApp::Ticket'; > my $DATE_FORMAT = '%Y-%m-%d %H:%M'; > -my $NOW = DateTime->now->strftime( $DATE_FORMAT ); > > require_ok( 'Workflow::Persister::DBI' ); > > @@ -26,6 +25,8 @@ > name => 'TestPersister', > class => 'Workflow::Persister::DBI', > dsn => 'DBI:Mock:', > + user => 'DBTester', > + date_format => $DATE_FORMAT, > }); > > my $factory = Workflow::Factory->instance; > @@ -37,6 +38,9 @@ > my $persister = $factory->get_persister( 'TestPersister' ); > my $handle = $persister->handle; > > +is ($persister->dsn(), 'DBI:Mock:', 'Got back dsn from config.'); > +is ($persister->date_format(), '%Y-%m-%d %H:%M', 'Got back date > format > from config.'); > + > my ( $wf ); > > { > @@ -52,7 +56,7 @@ > qr/^INSERT INTO workflow \( type, state, last_update, > workflow_id \)/, > [ 'type', 'state', 'current date', > 'random ID of correct length' ], > - [ 'Ticket', 'INITIAL', $NOW, > + [ 'Ticket', 'INITIAL', DateTime->now->strftime > ( $DATE_FORMAT ), > sub { my ( $val ) = @_; return ( length( $val ), 8 ) } ] > ); > > @@ -60,7 +64,7 @@ > TestUtil->check_workflow_history( > $hst_history, > [ $wf_id, 'Create workflow', 'Create new workflow', > - 'INITIAL', 'n/a', $NOW, > + 'INITIAL', 'n/a', DateTime->now->strftime( $DATE_FORMAT ), > sub { my ( $val ) = @_; return ( length( $val ), 8 ) } ] > ); > $handle->{mock_clear_history} = 1; > @@ -91,7 +95,7 @@ > 'due date', 'last update' ], > [ $ticket_id, $ticket_info{type}, $ticket_info{subject}, > $ticket_info{description}, $ticket_info{creator}, > $old_state, > - $ticket_info{due_date}->strftime( '%Y-%m-%d' ), $NOW ] > + $ticket_info{due_date}->strftime( '%Y-%m-%d' ), > DateTime->now->strftime( $DATE_FORMAT ) ] > ); > > my $link_create = $history->[1]; > @@ -102,7 +106,7 @@ > TestUtil->check_workflow_history( > $hst_update, > [ $wf_id, 'Create ticket', $history_desc, > - 'TIX_CREATED', $ticket_info{creator}, $NOW, > + 'TIX_CREATED', $ticket_info{creator}, > DateTime->now->strftime( $DATE_FORMAT ), > sub { my ( $val ) = @_; return ( length( $val ), 8 ) } ] > ); > > > > -- > Jim Brandt > Administrative Computing Services > University at Buffalo > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel |
From: Jim B. <cb...@bu...> - 2007-08-10 17:13:52
|
Hello, Pasted below is a patch that allows you to pass in a date format for Persister::DBI. A few notes: * It perpetuates the issue I brought up with subclassing I mentioned before since you need to set up date_format and parser in your own init if you subclass Persister::DBI and don't call SUPER::init. * I think a took care of a few warnings from the TODO: - Eliminate warnings from DBD::Mock should be fixed - Investigate failings tests in t/persister_dbi.t, Yes, this was related to dates. $NOW was set at the top of the file and then used throughout, so the time could be off by the end of the file. This was easy to see in the debugger if you stopped the program for a while and then continued. I improved it by putting the actual code in each call when the date is needed, but I think this issue can still come up if the second flips while running. It should be less likely now. I didn't update any versions. Let me know if you can use the diff for some reason. Thanks, Jim diff -urX workflow.exclude orig/Workflow-0.28/lib/Workflow/Action/InputField.pm working/Workflow-0.28/lib/Workflow/Action/InputField.pm --- orig/Workflow-0.28/lib/Workflow/Action/InputField.pm 2007-07-06 10:43:11.000000000 -0400 +++ working/Workflow-0.28/lib/Workflow/Action/InputField.pm 2007-08-10 11:35:40.000000000 -0400 @@ -17,7 +17,8 @@ sub new { my ( $class, $params ) = @_; my $log = get_logger(); - $log->debug( "Instantiating new field '$params->{name}'" ); + $log->debug( "Instantiating new field '$params->{name}'" ) + if $params->{name}; my $self = bless( {}, $class ); diff -urX workflow.exclude orig/Workflow-0.28/lib/Workflow/Persister/DBI.pm working/Workflow-0.28/lib/Workflow/Persister/DBI.pm --- orig/Workflow-0.28/lib/Workflow/Persister/DBI.pm 2007-07-06 10:43:11.000000000 -0400 +++ working/Workflow-0.28/lib/Workflow/Persister/DBI.pm 2007-08-10 12:49:31.000000000 -0400 @@ -17,11 +17,10 @@ $Workflow::Persister::DBI::VERSION = '1.19'; my @FIELDS = qw( handle dsn user password driver - workflow_table history_table ); + workflow_table history_table date_format parser); __PACKAGE__->mk_accessors( @FIELDS ); my ( $log ); -my $parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d %H:%M' ); my @WF_FIELDS = (); my @HIST_FIELDS = (); @@ -48,10 +47,16 @@ $log->info( "Assigned workflow table '", $self->workflow_table, "'; ", "history table '", $self->history_table, "'" ); - for ( qw( dsn user password ) ) { + # Default to old date format if not provided so we don't break old configurations. + $self->date_format( '%Y-%m-%d %H:%M' ); + + for ( qw( dsn user password date_format ) ) { $self->$_( $params->{ $_ } ) if ( $params->{ $_ } ); } + my $parser = DateTime::Format::Strptime->new( pattern => $self->date_format ); + $self->parser($parser); + my $dbh = eval { DBI->connect( $self->dsn, $self->user, $self->password ) || die "Cannot connect to database: $DBI::errstr"; @@ -183,7 +188,7 @@ my @fields = @WF_FIELDS[1,2,3]; my @values = ( $wf->type, $wf->state, - DateTime->now->strftime( '%Y-%m-%d %H:%M' ) ); + DateTime->now->strftime( $self->date_format() ) ); my $dbh = $self->handle; my $id = $self->workflow_id_generator->pre_fetch_id( $dbh ); @@ -249,7 +254,7 @@ my $row = $sth->fetchrow_arrayref; return undef unless ( $row ); return { state => $row->[0], - last_update => $parser->parse_datetime( $row->[1] ), }; + last_update => $self->parser->parse_datetime( $row->[1] ), }; } sub update_workflow { @@ -263,7 +268,7 @@ WHERE $WF_FIELDS[0] = ? }; $sql = sprintf( $sql, $self->workflow_table ); - my $update_date = DateTime->now->strftime( '%Y-%m-%d %H:%M' ); + my $update_date = DateTime->now->strftime( $self->date_format() ); if ( $log->is_debug ) { $log->debug( "Will use SQL\n$sql" ); @@ -293,7 +298,7 @@ my $id = $generator->pre_fetch_id( $dbh ); my @fields = @HIST_FIELDS[1..6]; my @values = ( $wf->id, $h->action, $h->description, $h->state, - $h->user, $h->date->strftime( '%Y-%m-%d %H:%M' ) ); + $h->user, $h->date->strftime( $self->date_format() ) ); if ( $id ) { push @fields, $HIST_FIELDS[0]; push @values, $id; @@ -368,7 +373,7 @@ description => $row->[3], state => $row->[4], user => $row->[5], - date => $parser->parse_datetime( $row->[6] ), + date => $self->parser->parse_datetime( $row->[6] ), }); $log->is_debug && $log->debug( "Fetched history object '$row->[0]'" ); @@ -530,6 +535,15 @@ Password for C<user> to login with. +=item B<date_format> + +Date format to use when working with the database. Accepts a format string +that can be processed by the DateTime module. See +L<http://search.cpan.org/~drolsky/DateTime-0.39/lib/DateTime.pm#strftime_Specifiers> +for the format options. + +The default is '%Y-%m-%d %H:%M' for backward compatibility. + =item B<workflow_table> Table to use for persisting workflow. Default is 'workflow'. @@ -699,4 +713,4 @@ Chris Winters E<lt>ch...@cw...E<gt>, original author. -=cut \ No newline at end of file +=cut diff -urX workflow.exclude orig/Workflow-0.28/t/TestUtil.pm working/Workflow-0.28/t/TestUtil.pm --- orig/Workflow-0.28/t/TestUtil.pm 2007-07-06 10:43:11.000000000 -0400 +++ working/Workflow-0.28/t/TestUtil.pm 2007-08-10 11:31:31.000000000 -0400 @@ -95,6 +95,7 @@ name => 'TestPersister', class => 'Workflow::Persister::DBI', dsn => 'DBI:Mock:', + user => 'DBTester', ); $factory->add_config( persister => [ \%persister ] ); } diff -urX workflow.exclude orig/Workflow-0.28/t/persister_dbi.t working/Workflow-0.28/t/persister_dbi.t --- orig/Workflow-0.28/t/persister_dbi.t 2007-07-06 10:43:11.000000000 -0400 +++ working/Workflow-0.28/t/persister_dbi.t 2007-08-10 11:27:49.000000000 -0400 @@ -5,7 +5,7 @@ use strict; use lib 't'; use TestUtil; -use constant NUM_TESTS => 41; +use constant NUM_TESTS => 43; use Test::More; eval "require DBI"; @@ -18,7 +18,6 @@ my $TICKET_CLASS = 'TestApp::Ticket'; my $DATE_FORMAT = '%Y-%m-%d %H:%M'; -my $NOW = DateTime->now->strftime( $DATE_FORMAT ); require_ok( 'Workflow::Persister::DBI' ); @@ -26,6 +25,8 @@ name => 'TestPersister', class => 'Workflow::Persister::DBI', dsn => 'DBI:Mock:', + user => 'DBTester', + date_format => $DATE_FORMAT, }); my $factory = Workflow::Factory->instance; @@ -37,6 +38,9 @@ my $persister = $factory->get_persister( 'TestPersister' ); my $handle = $persister->handle; +is ($persister->dsn(), 'DBI:Mock:', 'Got back dsn from config.'); +is ($persister->date_format(), '%Y-%m-%d %H:%M', 'Got back date format from config.'); + my ( $wf ); { @@ -52,7 +56,7 @@ qr/^INSERT INTO workflow \( type, state, last_update, workflow_id \)/, [ 'type', 'state', 'current date', 'random ID of correct length' ], - [ 'Ticket', 'INITIAL', $NOW, + [ 'Ticket', 'INITIAL', DateTime->now->strftime( $DATE_FORMAT ), sub { my ( $val ) = @_; return ( length( $val ), 8 ) } ] ); @@ -60,7 +64,7 @@ TestUtil->check_workflow_history( $hst_history, [ $wf_id, 'Create workflow', 'Create new workflow', - 'INITIAL', 'n/a', $NOW, + 'INITIAL', 'n/a', DateTime->now->strftime( $DATE_FORMAT ), sub { my ( $val ) = @_; return ( length( $val ), 8 ) } ] ); $handle->{mock_clear_history} = 1; @@ -91,7 +95,7 @@ 'due date', 'last update' ], [ $ticket_id, $ticket_info{type}, $ticket_info{subject}, $ticket_info{description}, $ticket_info{creator}, $old_state, - $ticket_info{due_date}->strftime( '%Y-%m-%d' ), $NOW ] + $ticket_info{due_date}->strftime( '%Y-%m-%d' ), DateTime->now->strftime( $DATE_FORMAT ) ] ); my $link_create = $history->[1]; @@ -102,7 +106,7 @@ TestUtil->check_workflow_history( $hst_update, [ $wf_id, 'Create ticket', $history_desc, - 'TIX_CREATED', $ticket_info{creator}, $NOW, + 'TIX_CREATED', $ticket_info{creator}, DateTime->now->strftime( $DATE_FORMAT ), sub { my ( $val ) = @_; return ( length( $val ), 8 ) } ] ); -- Jim Brandt Administrative Computing Services University at Buffalo |
From: jonasbn <jo...@gm...> - 2007-08-08 12:20:28
|
Hello All, I hope you have, and perhaps still is, enjoying a marvellous summer. One of my friends pointed me to a criticism of Workflow. I could not let this go unanswered. http://grokbase.com/thread/2007/07/24/catalyst-using-workflow-with- catalyst-was-making-controllers-thin-and-models-thick/ DUGfwILCDkqcugOcAQQZkxzqbNw#pmfQGCGrMCr4N1zKpQy_mn4fnyc I am now in dialogue with two people interesting in integrating a workflow with Catalyst, I think they will end up with Class::Workflow, but for now I am participating in the discussions to the extent I can. If any of you would be interested in participating in this sub-project let me know. jonasbn |
From: jonasbn <jo...@gm...> - 2007-08-08 12:14:06
|
Hi Jim, Thanks for sharing. It seems as if we have general problems with subclassing of some of the core classes. I will put this on the task list, since I think it should be easier to subclass persisters among other things. jonasbn On 10/07/2007, at 19.30, Jim Brandt wrote: > > I've just finished subclassing Workflow::DBI::Persister and ran into a > few problems I wanted to share. Don't have any specific solutions just > yet, just my work-arounds: > > 1) I don't think you can actually just subclass as shown here: > > http://search.cpan.org/~jonasbn/Workflow-0.26/lib/Workflow/ > Persister/DBI.pm > > unless you call SUPER::init because you'll get a $log not defined > error > when the code hits assign_generators. This is because the $log ||= > get_logger is below the first $log call. I think if it gets moved up, > the problem will be fixed: > > sub assign_generators { > my ( $self, $params, $driver ) = @_; > $log ||= get_logger(); > $log->is_debug && > $log->debug( "assign_generators with $self, $params, > $driver" ); > $self->SUPER::assign_generators( $params ); > return if ( $self->workflow_id_generator and > $self->history_id_generator ); > > move this up --> $log ||= get_logger(); > my ( $wf_gen, $history_gen ); > > 2) I think the 'assign_generators' example on the page has the params > backwards. It shows: > > $self->assign_generators( $ds_config->{driver_name}, $params ); > > But I think that method wants $params first. > > 3) There doesn't seem to be an easy way to subclass the Persister and > use ExtraData at the same time. I did it by subclassing ExtraData.pm, > but I had to copy most of init and chop out a few things since I > didn't > want to call SUPER::init. > > Maybe pull out the parts that load the extra values into a separate > sub > so if you subclass you just need to add a call to: > > $self->load_extra_data(); > > to your init? Just a thought. I'm sure there are other solutions. > > As I said, sorry I don't have actual patches right now. I just > wanted to > capture the info while it was fresh. > > > Jim > > > -- > Jim Brandt > Administrative Computing Services > University at Buffalo > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel |
From: Jim B. <cb...@bu...> - 2007-07-10 17:30:19
|
I've just finished subclassing Workflow::DBI::Persister and ran into a few problems I wanted to share. Don't have any specific solutions just yet, just my work-arounds: 1) I don't think you can actually just subclass as shown here: http://search.cpan.org/~jonasbn/Workflow-0.26/lib/Workflow/Persister/DBI.pm unless you call SUPER::init because you'll get a $log not defined error when the code hits assign_generators. This is because the $log ||= get_logger is below the first $log call. I think if it gets moved up, the problem will be fixed: sub assign_generators { my ( $self, $params, $driver ) = @_; $log ||= get_logger(); $log->is_debug && $log->debug( "assign_generators with $self, $params, $driver" ); $self->SUPER::assign_generators( $params ); return if ( $self->workflow_id_generator and $self->history_id_generator ); move this up --> $log ||= get_logger(); my ( $wf_gen, $history_gen ); 2) I think the 'assign_generators' example on the page has the params backwards. It shows: $self->assign_generators( $ds_config->{driver_name}, $params ); But I think that method wants $params first. 3) There doesn't seem to be an easy way to subclass the Persister and use ExtraData at the same time. I did it by subclassing ExtraData.pm, but I had to copy most of init and chop out a few things since I didn't want to call SUPER::init. Maybe pull out the parts that load the extra values into a separate sub so if you subclass you just need to add a call to: $self->load_extra_data(); to your init? Just a thought. I'm sure there are other solutions. As I said, sorry I don't have actual patches right now. I just wanted to capture the info while it was fresh. Jim -- Jim Brandt Administrative Computing Services University at Buffalo |
From: jonasbn <jo...@gm...> - 2007-07-06 14:53:40
|
Hello All, I am happy to annouce the release of 0.28 of Workflow. The release is just a maintenance release, it addresses two test reports of failing tests from CPAN testers and we finally reached 100% POD coverage. Have a nice weekend, jonasbn |
From: jonasbn <jo...@gm...> - 2007-07-06 11:53:42
|
Hello All, Check out these nice new resources: per...@li..., commit mailing list RSS: http://rss.gmane.org/messages/excerpts/ gmane.comp.lang.perl.modules.workflow.scm Archive: http://dir.gmane.org/gmane.comp.lang.perl.modules.workflow.scm NNTP: nntp://news.gmane.org/gmane.comp.lang.perl.modules.workflow.scm Great suggestion with gmane alex, the RSS feed works like a charm, jonasbn |
From: jonasbn <jo...@gm...> - 2007-07-05 07:08:09
|
Hello All, I got some test reports on failing tests for 0.27, the failing test are pretty logical since I did not implement conditinal testing of some of the optional modules. So I have migrated the conditionals to the problematic area, this should address these failing tests. I have finally gotten around to documenting all the subs/methods in Workflow, which where not documented, so I am happy to announce that we now have a POD coverage of 100%. Our overall coverage is 73.0% (see also: notes/test_coverage_0.28.txt). This does however not say anything about the correctness and the quality of the POD, but I expect to revisit all POD at some point and improve the quality and readability of this. So I am getting close to making a maintenance release for workflow (0.28). Do any of you have anything else we need to address or to include in the release. Comments, feedback, suggestions? jonasbn |
From: jonasbn <jo...@gm...> - 2007-07-04 15:41:36
|
Hi again, I disabled CVS for our project. All activities should proceed in Subversion, if there are anybody out there, who need help with this or want to register as developer let me know. jonasbn |
From: jonasbn <jo...@gm...> - 2007-07-04 15:38:18
|
Hi Alex, I have created a mailing list with the name you suggested it will work within some hours (6-24 hours). I will set up the gmane archive and RSS feed when it becomes available. Information will be published here when available. jonasbn On 04/07/2007, at 12.49, Alexander Klink wrote: >> Ok I have had a look at gmane and the SourceForge docs. I can install >> a hook, which mails the commit notifications to somewhere (a mailing >> list is recommended). >> >> All I need to do is appoint an email address. >> >> So I will set up a mailing list (suggestions for names are welcome) > perl-workflow-svn sounds good to me ... > > Best regards, > Alex |
From: Alexander K. <ak-...@cy...> - 2007-07-04 10:49:48
|
> Ok I have had a look at gmane and the SourceForge docs. I can install > a hook, which mails the commit notifications to somewhere (a mailing > list is recommended). > > All I need to do is appoint an email address. > > So I will set up a mailing list (suggestions for names are welcome) perl-workflow-svn sounds good to me ... Best regards, Alex |
From: jonasbn <jo...@gm...> - 2007-07-03 21:30:25
|
Hi Alex, On 03/07/2007, at 17.23, Alexander Klink wrote: > Hi Jonas, > > On Tue, Jul 03, 2007 at 05:17:40PM +0200, jonasbn wrote: >> A new maintenance release have just made it to CPAN, 0.27 > Fine :-) > >> Does anybody know btw, if there is a commit RSS feed, I had not seen >> that Alex had perfomed my requested actions. > AFAIK Sourceforge does not provide one :-( > >> I use such a feed for a work subversion server at it works quite nice >> if you are monitoring several repositories. > Indeed, feeds are a pretty useful thing to have ... > >> Perhaps it is possible to set this up for our project alone? > I guess the simplest way would be to create a mailing list for the > subversion checkings (+ maybe tracker changes, we post them to same > mailinglist at the OpenXPKI project), archive that at (for example) > gmane and read their RSS feed ... > Ok I have had a look at gmane and the SourceForge docs. I can install a hook, which mails the commit notifications to somewhere (a mailing list is recommended). All I need to do is appoint an email address. So I will set up a mailing list (suggestions for names are welcome) at SourceForge and add this to gmane. Any thoughts? jonasbn > Best regards, > Alex > -- > Dipl.-Math. Alexander Klink | IT-Security Engineer > ak-...@cy... | working @ urn:oid:1.3.6.1.4.1.11417 > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel |
From: Alexander K. <ak-...@cy...> - 2007-07-03 15:23:59
|
Hi Jonas, On Tue, Jul 03, 2007 at 05:17:40PM +0200, jonasbn wrote: > A new maintenance release have just made it to CPAN, 0.27 Fine :-) > Does anybody know btw, if there is a commit RSS feed, I had not seen > that Alex had perfomed my requested actions. AFAIK Sourceforge does not provide one :-( > I use such a feed for a work subversion server at it works quite nice > if you are monitoring several repositories. Indeed, feeds are a pretty useful thing to have ... > Perhaps it is possible to set this up for our project alone? I guess the simplest way would be to create a mailing list for the subversion checkings (+ maybe tracker changes, we post them to same mailinglist at the OpenXPKI project), archive that at (for example) gmane and read their RSS feed ... Best regards, Alex -- Dipl.-Math. Alexander Klink | IT-Security Engineer ak-...@cy... | working @ urn:oid:1.3.6.1.4.1.11417 |
From: jonasbn <jo...@gm...> - 2007-07-03 15:17:55
|
Hello All, A new maintenance release have just made it to CPAN, 0.27 This release contains two pathes and we are happy to say welcome and thank you to a new patcher, thanks Jim. The release holds minor updates to POD and tests, in our quest for higher test coverage, more documentation and in general better quality, we are slowly getting somewhere. Our current test coverage is at: 72.5% There is still a long way to go and the TODO list is growing too, but we are in no hurry. Does anybody know btw, if there is a commit RSS feed, I had not seen that Alex had perfomed my requested actions. I use such a feed for a work subversion server at it works quite nice if you are monitoring several repositories. Perhaps it is possible to set this up for our project alone? Take care, jonasbn |
From: Jonas B. N. <jo...@gm...> - 2007-06-28 20:07:51
|
Hi Alex, Can you please describe the patch in the Changes file. Then I will make a release over the weekend. Marvellous work with the tests btw. our test coverage is at: 72.5 % jonasbn On 28/06/2007, at 16.26, Alexander Klink wrote: > Hi Jonas, > Hi all, > > I've just checked in a bugfix for the cached condition handling. > In OpenXPKI, under mysterious circumstances, we ran into a race > condition where a workflow checked the state of its forked child > and the result of the checking condition and its inverse (using the > '!'-syntax) where either both true or both false sometimes. > This is the same race that was to be prevented by implementing the > '!'-syntax in the first place. Apparently, my fix that cleared > the condition cache so that circular workflows would not run forever > reintroduced the race again :-( > The fix now resets the condition cache on state changes and when > get_available_action_names() is called and introduces corresponding > tests. > Jonas: a quick maintenance release incorporating the patch would be > highly appreciated ... > > Best regards, > Alex > > P.S.: Sorry to hear about EBADCONTRACT :-( > -- > Dipl.-Math. Alexander Klink | IT-Security Engineer > ak-...@cy... | working @ urn:oid:1.3.6.1.4.1.11417 > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel |
From: Alexander K. <ak-...@cy...> - 2007-06-28 14:27:01
|
Hi Jonas, Hi all, I've just checked in a bugfix for the cached condition handling. In OpenXPKI, under mysterious circumstances, we ran into a race condition where a workflow checked the state of its forked child and the result of the checking condition and its inverse (using the '!'-syntax) where either both true or both false sometimes. This is the same race that was to be prevented by implementing the '!'-syntax in the first place. Apparently, my fix that cleared the condition cache so that circular workflows would not run forever reintroduced the race again :-( The fix now resets the condition cache on state changes and when get_available_action_names() is called and introduces corresponding tests. Jonas: a quick maintenance release incorporating the patch would be highly appreciated ... Best regards, Alex P.S.: Sorry to hear about EBADCONTRACT :-( -- Dipl.-Math. Alexander Klink | IT-Security Engineer ak-...@cy... | working @ urn:oid:1.3.6.1.4.1.11417 |
From: Jonas B. N. <jo...@gm...> - 2007-06-20 07:59:32
|
Hello All, I am currently quite busy with work, but that does not mean that Workflow has been put totally on ice. I am working on the next maintenance release currently and I have migrated from CVS to Subversion. I have adapted the patch from Jim Brandt (thanks Jim). Since Subversion uses a different revision number format I have adapted all of the version numbers from release 0.26 as versions for out components, this mean that these no longer are automatically updated. We have to do this by hand from now on. I do however only recommend increasing these if major changes are made. So POD additions and occasional whitespace/ curly flip-flopping does not require a version update. I have tested some more components, here follows the current test coverage report: ---------------------------- ------ ------ ------ ------ ------ ------ ------ File stmt bran cond sub pod time total ---------------------------- ------ ------ ------ ------ ------ ------ ------ blib/lib/Workflow.pm 76.4 48.4 40.0 81.8 100.0 2.4 67.6 blib/lib/Workflow/Action.pm 87.7 66.7 n/a 80.0 88.9 1.1 85.6 ...flow/Action/InputField.pm 78.1 65.4 50.0 70.0 83.3 1.0 72.8 ...Workflow/Action/Mailer.pm 85.7 n/a n/a 66.7 n/a 0.0 80.0 ...b/Workflow/Action/Null.pm 100.0 n/a n/a 100.0 100.0 0.1 100.0 blib/lib/Workflow/Base.pm 96.4 86.4 100.0 100.0 100.0 2.7 94.8 ...lib/Workflow/Condition.pm 84.6 n/a n/a 80.0 100.0 0.2 85.0 ...low/Condition/Evaluate.pm 41.7 0.0 0.0 71.4 100.0 0.4 33.9 ...flow/Condition/HasUser.pm 52.2 0.0 0.0 66.7 100.0 0.0 45.9 blib/lib/Workflow/Config.pm 87.5 62.5 0.0 90.9 100.0 2.1 80.5 ...b/Workflow/Config/Perl.pm 96.6 72.2 66.7 100.0 100.0 2.1 91.0 ...ib/Workflow/Config/XML.pm 97.8 60.0 60.0 100.0 100.0 2.3 85.7 blib/lib/Workflow/Context.pm 100.0 n/a n/a 100.0 100.0 0.1 100.0 ...lib/Workflow/Exception.pm 70.6 50.0 n/a 63.6 16.7 1.0 62.3 blib/lib/Workflow/Factory.pm 88.8 61.7 41.5 97.1 92.3 7.1 77.5 blib/lib/Workflow/History.pm 92.0 83.3 n/a 87.5 60.0 0.7 86.4 ...lib/Workflow/Persister.pm 72.7 75.0 57.1 57.1 60.0 0.4 68.4 ...Workflow/Persister/DBI.pm 72.6 42.3 25.0 80.8 92.9 1.5 63.1 ...er/DBI/AutoGeneratedId.pm 36.4 0.0 n/a 57.1 33.3 0.1 27.0 ...ersister/DBI/ExtraData.pm 21.8 0.0 0.0 66.7 50.0 0.1 18.5 ...rsister/DBI/SequenceId.pm 51.7 0.0 0.0 71.4 0.0 0.1 44.4 ...orkflow/Persister/File.pm 94.2 48.0 33.3 100.0 75.0 70.0 81.6 ...low/Persister/RandomId.pm 100.0 n/a 100.0 100.0 33.3 0.4 92.0 ...rkflow/Persister/SPOPS.pm 89.2 50.0 n/a 100.0 100.0 0.1 84.4 ...orkflow/Persister/UUID.pm 100.0 n/a n/a 100.0 0.0 0.2 85.0 blib/lib/Workflow/State.pm 47.0 16.3 23.8 77.3 91.7 2.4 40.1 ...lib/Workflow/Validator.pm 86.7 100.0 n/a 80.0 100.0 0.5 87.5 ...dator/HasRequiredField.pm 88.2 50.0 n/a 100.0 100.0 0.2 84.6 ...dator/InEnumeratedType.pm 90.0 66.7 n/a 87.5 100.0 0.2 87.5 ...ator/MatchesDateFormat.pm 81.5 50.0 33.3 100.0 100.0 0.4 74.5 Total 76.9 46.1 35.4 84.4 79.7 100.0 68.7 ---------------------------- ------ ------ ------ ------ ------ ------ ------ I finally got SPOPS installed and with my latest test additions our test coverage has risen to: 68.7 percent For the record release 0.25 had a coverage of 67.2 percent. The goal is to get as close as possible to the 100%. The next step to follow this will be a major static code analysis using Perl::Critic with proper and useful policies. Then will follow a major refactoring based on the Perl::Critic reports. I am not decided, but when this is completed perhaps we should label the release 1.0.0 The maintenance release will follow sometime shortly, I just want to add some more POD, since the POD coverage is pretty bad. Any thoughts, suggestions or anything? jonasbn |
From: Jim B. <cb...@bu...> - 2007-06-07 20:25:16
|
Attached is a simple patch that makes Workflow/Config/XML.pm component spit out the file name in addition to the parsing error when it chokes on something. I was loading several files, and this made it much easier to track down where the parsing errors were. Feel free to tweak for style, etc. I just wanted to see the file name. Jim -- Jim Brandt Administrative Computing Services University at Buffalo |
From: Jim B. <cb...@bu...> - 2007-06-05 12:50:37
|
I can work up a patch if you like. I can make the new param optional so it defaults to the current setting. This should prevent any fix from breaking anyone's current configuration. The only challenge I see so far is a $parser package variable at the top of Persister/DBI.pm: my $parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d %H:%M' ); Anyone know why it's up there? Does it need to be global or could it be moved to object data? Thanks, Jim Jonas B. Nielsen wrote: > Hello Jim and welcome, > > Your suggestion for putting the format in the persister config is good, > since I am sure that the different DB backends use differing formats and > we also have to adapt/support non-db persisters. > > So does anybody else have a take on this, else I will set up a task for > this and put it in the roadmap. > > > jonasbn > > On 04/06/2007, at 21.35, Jim Brandt wrote: > >> Hello all, >> >> I've been working with the Workflow module using Oracle as the DB >> back-end. I found that the default date formats didn't work with our >> Oracle DB. I was able to change them by hacking >> Workflow/Persister/DBI.pm, but I was wondering if there was a way to >> make this easier to configure. >> >> Maybe make the format something you could set in the persister.xml >> config file? >> >> Any other ideas? Anyone else have issues with the default data formats? >> >> The changes I made were like: >> >> #my $parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d >> %H:%M' ); >> my $parser = DateTime::Format::Strptime->new( pattern => >> '%m:%d:%Y:%H:%M:%S' ); >> >> >> Thanks, >> Jim >> >> >> -- >> Jim Brandt >> Administrative Computing Services >> University at Buffalo >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Perl-workflow-devel mailing list >> Per...@li... >> https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel > -- Jim Brandt Administrative Computing Services University at Buffalo |
From: Jonas B. N. <jo...@gm...> - 2007-06-05 08:07:48
|
Hello Jim and welcome, Your suggestion for putting the format in the persister config is good, since I am sure that the different DB backends use differing formats and we also have to adapt/support non-db persisters. So does anybody else have a take on this, else I will set up a task for this and put it in the roadmap. jonasbn On 04/06/2007, at 21.35, Jim Brandt wrote: > Hello all, > > I've been working with the Workflow module using Oracle as the DB > back-end. I found that the default date formats didn't work with our > Oracle DB. I was able to change them by hacking > Workflow/Persister/DBI.pm, but I was wondering if there was a way to > make this easier to configure. > > Maybe make the format something you could set in the persister.xml > config file? > > Any other ideas? Anyone else have issues with the default data > formats? > > The changes I made were like: > > #my $parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d > %H:%M' ); > my $parser = DateTime::Format::Strptime->new( pattern => > '%m:%d:%Y:%H:%M:%S' ); > > > Thanks, > Jim > > > -- > Jim Brandt > Administrative Computing Services > University at Buffalo > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel |
From: Jonas B. N. <jo...@gm...> - 2007-06-05 08:02:30
|
Hello All, The subversion migration has been completed and the sourcecode should now be available in Subversion (also still in CVS), but future work will use Subversion. See more at: http://sourceforge.net/svn/?group_id=177533 or the brief version: svn co https://perl-workflow.svn.sourceforge.net/svnroot/perl- workflow perl-workflow jonasbn On 05/06/2007, at 8.15, Jonas B. Nielsen wrote: > Hello All, > > I have initiated the cvs to svn migration. The proces is now queued > with sf.net and can take up to a couple of days. I will post the > subversion information when the process has finished. > > jonasbn > > On 02/06/2007, at 23.00, Jonas B. Nielsen wrote: > >> Hello All, >> >> I have just gotten cvs2svn installed on my Apple workstation. >> >> http://cvs2svn.tigris.org/servlets/ProjectDocumentList?folderID=2976 >> >> This gave me some trouble, but this page came to the rescue: >> >> http://blog.plasticsfuture.org/2006/03/04/install-cvs2svn-on-mac- >> os-x-1042/ >> >> Following this SF.net guide, I will migrate CVS to Subversion: >> >> http://sourceforge.net/docs/E09#import >> >> This article was also a good reference: >> >> http://www.onlamp.com/pub/a/onlamp/2005/10/03/cvs-to-subversion- >> with-cvs2svn.html >> >> I will fool around with a dump file to begin width and I will >> initiate the conversion monday (4th. June 2007) unless somebody >> tell me not to. So if you have code, which is not checked in, you >> can either wait until subversion is accessible or you can check it >> in now. >> >> >> jonasbn >> >> > |
From: Jonas B. N. <jo...@gm...> - 2007-06-05 06:18:56
|
Hello All, I have initiated the cvs to svn migration. The proces is now queued with sf.net and can take up to a couple of days. I will post the subversion information when the process has finished. jonasbn On 02/06/2007, at 23.00, Jonas B. Nielsen wrote: > Hello All, > > I have just gotten cvs2svn installed on my Apple workstation. > > http://cvs2svn.tigris.org/servlets/ProjectDocumentList?folderID=2976 > > This gave me some trouble, but this page came to the rescue: > > http://blog.plasticsfuture.org/2006/03/04/install-cvs2svn-on-mac- > os-x-1042/ > > Following this SF.net guide, I will migrate CVS to Subversion: > > http://sourceforge.net/docs/E09#import > > This article was also a good reference: > > http://www.onlamp.com/pub/a/onlamp/2005/10/03/cvs-to-subversion- > with-cvs2svn.html > > I will fool around with a dump file to begin width and I will > initiate the conversion monday (4th. June 2007) unless somebody > tell me not to. So if you have code, which is not checked in, you > can either wait until subversion is accessible or you can check it > in now. > > > jonasbn > > |
From: Jim B. <cb...@bu...> - 2007-06-04 19:35:55
|
Hello all, I've been working with the Workflow module using Oracle as the DB back-end. I found that the default date formats didn't work with our Oracle DB. I was able to change them by hacking Workflow/Persister/DBI.pm, but I was wondering if there was a way to make this easier to configure. Maybe make the format something you could set in the persister.xml config file? Any other ideas? Anyone else have issues with the default data formats? The changes I made were like: #my $parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d %H:%M' ); my $parser = DateTime::Format::Strptime->new( pattern => '%m:%d:%Y:%H:%M:%S' ); Thanks, Jim -- Jim Brandt Administrative Computing Services University at Buffalo |
From: Jonas B. N. <jo...@gm...> - 2007-06-02 21:00:15
|
Hello All, I have just gotten cvs2svn installed on my Apple workstation. http://cvs2svn.tigris.org/servlets/ProjectDocumentList?folderID=2976 This gave me some trouble, but this page came to the rescue: http://blog.plasticsfuture.org/2006/03/04/install-cvs2svn-on-mac-os- x-1042/ Following this SF.net guide, I will migrate CVS to Subversion: http://sourceforge.net/docs/E09#import This article was also a good reference: http://www.onlamp.com/pub/a/onlamp/2005/10/03/cvs-to-subversion-with- cvs2svn.html I will fool around with a dump file to begin width and I will initiate the conversion monday (4th. June 2007) unless somebody tell me not to. So if you have code, which is not checked in, you can either wait until subversion is accessible or you can check it in now. jonasbn |
From: Jonas B. N. <jo...@gm...> - 2007-06-01 21:14:21
|
Hi Alexander and others, I would say we should go for the right solution. Of course it should be possible to add your own factory and subclass the existing one. So we just have to take it the loooong way, eventhough this mean lots of changes all over the place, but the current implementation is not as flexible as one could wish. jonasbn On 22/05/2007, at 9.44, Alexander Klink wrote: > Hi all, > > in OpenXPKI, we are currently doing funny things with having multiple > different configurations available in the system and we would like to > have multiple Workflow::Factory instances with different > configuration. > Unfortunately, Workflow::Factory is singleton for now. What would you > think about adding a 'force' parameter to Workflow::Factory->new() > that would allow people to create a new (second, third, ...) instance? > > The alternative of subclassing Workflow::Factory works, but is not > very > elegant. The RT bug #18159 gets it correctly when saying that > subclassing Workflow::Factory is broken. Even though I can have my own > Factory class and instance, once objects are created (i.e. > Workflow::State objects), they use 'use Workflow::Factory qw > ( FACTORY )' > instead of my factory (instance). Changing that would probably involve > passing the factory instance to every 'new()' there is, which seems > like > a lot of work. For now, we are using the ugly hack of changing the > symbol table: *Workflow::State::FACTORY = sub { return $factory } (and > so on for different classes as well). If someone has an easy solution > that solves this bug, I'd be happy to implement it as well (because > people might want to change their factory in ways different to ours > and that is a good thing) ... > > Best regards, > Alex > -- > Dipl.-Math. Alexander Klink | IT-Security Engineer > ak-...@cy... | working @ urn:oid:1.3.6.1.4.1.11417 > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel |