[system] / trunk / pg / lib / Value.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Value.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5098 Revision 5099
255# Check if the object class matches one of a list of classes 255# Check if the object class matches one of a list of classes
256# 256#
257sub classMatch { 257sub classMatch {
258 my $self = shift; my $class = class($self); 258 my $self = shift; my $class = class($self);
259 my $ref = ref($self); my $isHash = ($ref && $ref ne 'ARRAY' && $ref ne 'CODE'); 259 my $ref = ref($self); my $isHash = ($ref && $ref ne 'ARRAY' && $ref ne 'CODE');
260 my $context = ($isHash ? $self->{context} : Value->context); 260 my $context = ($isHash ? $self->{context} || Value->context : Value->context);
261 foreach my $name (@_) { 261 foreach my $name (@_) {
262 return 1 if $class eq $name || $ref eq $context->Package($name,0) || 262 return 1 if $class eq $name || $ref eq $context->Package($name,1) ||
263 $ref eq "Value::$name" || ($isHash && $self->{"is".$name}); 263 $ref eq "Value::$name" || ($isHash && $self->{"is".$name});
264 } 264 }
265 return 0; 265 return 0;
266} 266}
267 267

Legend:
Removed from v.5098  
changed lines
  Added in v.5099

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9