|
From: Chris W. <la...@us...> - 2001-10-15 22:00:07
|
Update of /cvsroot/openinteract/SPOPS/SPOPS/ClassFactory
In directory usw-pr-cvs1:/tmp/cvs-serv22875
Modified Files:
DefaultBehavior.pm
Log Message:
Rulesets used to be generated using the method 'ruleset_add'. We now
use 'ruleset_factory' since it's more descriptive and consistent with
the behavior generation code. However, we forgot to keep the old
method enabled for a few versions. Fixed. (Thanks to Peter Beardsley
<pbe...@ap...> for the report.)
Index: DefaultBehavior.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/SPOPS/ClassFactory/DefaultBehavior.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** DefaultBehavior.pm 2001/10/15 04:27:39 1.11
--- DefaultBehavior.pm 2001/10/15 22:00:04 1.12
***************
*** 321,327 ****
# Now find all the classes that have the method RULESET_METHOD
my $rule_classes = $CONFIG->{rules_from} || [];
! my $subs = SPOPS::ClassFactory->find_parent_methods( $class, $rule_classes, RULESET_METHOD );
foreach my $sub_info ( @{ $subs } ) {
$sub_info->[1]->( $class, $class->RULESET );
--- 321,328 ----
# Now find all the classes that have the method RULESET_METHOD
+ # (and 'ruleset_add' for backwards compatibility)
my $rule_classes = $CONFIG->{rules_from} || [];
! my $subs = SPOPS::ClassFactory->find_parent_methods( $class, $rule_classes, RULESET_METHOD, 'ruleset_add' );
foreach my $sub_info ( @{ $subs } ) {
$sub_info->[1]->( $class, $class->RULESET );
|