From: Chris W. <la...@us...> - 2005-01-24 17:24:42
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21576 Modified Files: Setup.pm Log Message: until my A::D patch is accepted this will have to do... Index: Setup.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Setup.pm,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Setup.pm 24 Jan 2005 17:17:32 -0000 1.55 --- Setup.pm 24 Jan 2005 17:24:31 -0000 1.56 *************** *** 181,184 **** --- 181,210 ---- $DEFAULT_DEPENDENCY = OpenInteract2::Setup::ReadServerConfig->get_name; + { + no strict; + if ( Algorithm::Dependency->VERSION <= 1.03 ) { + *Algorithm::Dependency::without = sub { + my $self = shift; + my @without = @_; + my $all_items = $self->schedule_all(); + unless ( scalar @without ) { + return $all_items; + } + my %to_skip = map { $_ => 1 } @without; + my @good_items = (); + + foreach my $item ( @{ $all_items } ) { + next if ( $to_skip{ $item } ); + my $all_item_dep = $self->depends( $item ); + foreach my $item_dep ( @{ $all_item_dep } ) { + next if ( $to_skip{ $item_dep } ); + } + push @good_items, $item; + } + return \@good_items; + }; + } + } + 1; |