[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 5383 Revision 5384
348 return $self->classMatch(@_) if Value->subclassed($self,"classMatch"); 348 return $self->classMatch(@_) if Value->subclassed($self,"classMatch");
349 my $class = class($self); my $ref = ref($self); 349 my $class = class($self); my $ref = ref($self);
350 my $isHash = ($ref && $ref ne 'ARRAY' && $ref ne 'CODE'); 350 my $isHash = ($ref && $ref ne 'ARRAY' && $ref ne 'CODE');
351 my $context = ($isHash ? $self->{context} || Value->context : Value->context); 351 my $context = ($isHash ? $self->{context} || Value->context : Value->context);
352 foreach my $name (@_) { 352 foreach my $name (@_) {
353 my $isName = "is".$name;
353 return 1 if $class eq $name || $ref eq "Value::$name" || 354 return 1 if $class eq $name || $ref eq "Value::$name" ||
354 ($isHash && $self->{"is".$name}) || 355 ($isHash && $self->{$isName}) ||
355 $ref eq $context->Package($name,1) || 356 $ref eq $context->Package($name,1) ||
356 isa($self,"Value::$name"); 357 (isa($self,"Value::$name") &&
358 !($isHash && defined($self->{$isName}) && $self->{$isName} == 0));
357 } 359 }
358 return 0; 360 return 0;
359} 361}
360 362
361=head3 makeValue 363=head3 makeValue

Legend:
Removed from v.5383  
changed lines
  Added in v.5384

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9