From: Mike G. v. a. <we...@ma...> - 2008-06-24 21:54:39
|
Log Message: ----------- Remove duplicate definitions of subroutines Tags: ---- rel-2-4-patches Modified Files: -------------- pg/lib: Value.pm Revision Data ------------- Index: Value.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value.pm,v retrieving revision 1.53.2.3.2.1 retrieving revision 1.53.2.3.2.2 diff -Llib/Value.pm -Llib/Value.pm -u -r1.53.2.3.2.1 -r1.53.2.3.2.2 --- lib/Value.pm +++ lib/Value.pm @@ -285,21 +285,6 @@ return $code && $code ne $self->can($method); } - -# -# Check if the object class matches one of a list of classes -# -sub classMatch { - my $self = shift; my $class = class($self); - my $ref = ref($self); my $isHash = ($ref && $ref ne 'ARRAY' && $ref ne 'CODE'); - my $context = ($isHash ? $self->{context} || Value->context : Value->context); - foreach my $name (@_) { - return 1 if $class eq $name || $ref eq $context->Package($name,1) || - $ref eq "Value::$name" || ($isHash && $self->{"is".$name}); - } - return 0; -} - # # Check if a value is a number, complex, etc. # @@ -375,16 +360,6 @@ return 0; } -###################################################################### - -# -# Value->Package(name[,noerror]]) -# -# Returns the package name for the specificied Value object class -# (as specified by the context's {value} hash, or "Value::name"). -# -sub Package {(shift)->context->Package(@_)} - =head3 makeValue Usage: Value::makeValue(45); |