diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-06-18 17:36:47 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-06-18 21:47:18 +0200 |
commit | 7e7e174a50ec459629dac75157a07f6a7b252501 (patch) | |
tree | a09de361c0b4136f9c834cbebc706f86691db647 /lib/Class | |
parent | 6d03472805c9a5c7e8289605650bfee899dffa69 (diff) | |
download | perl-7e7e174a50ec459629dac75157a07f6a7b252501.tar.gz |
Remove some 5.002 and 5.003 compatibility code from Class::Struct.
Diffstat (limited to 'lib/Class')
-rw-r--r-- | lib/Class/Struct.pm | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm index 9ae3ff9fdf..ecb623199f 100644 --- a/lib/Class/Struct.pm +++ b/lib/Class/Struct.pm @@ -16,9 +16,6 @@ require Exporter; $VERSION = '0.64'; -## Tested on 5.002 and 5.003 without class membership tests: -my $CHECK_CLASS_MEMBERSHIP = ($] >= 5.003_95); - my $print = 0; sub printem { if (@_) { $print = shift } @@ -220,9 +217,7 @@ sub struct { $sel = "->{\$i}"; } elsif( defined $classes{$name} ){ - if ( $CHECK_CLASS_MEMBERSHIP ) { - $out .= " croak '$name argument is wrong class' if \@_ && ! UNIVERSAL::isa(\$_[0], '$classes{$name}');\n"; - } + $out .= " croak '$name argument is wrong class' if \@_ && ! UNIVERSAL::isa(\$_[0], '$classes{$name}');\n"; } $out .= " croak 'Too many args to $name' if \@_ > 1;\n"; $out .= " \@_ ? ($pre\$r->$elem$sel = shift$pst) : $pre\$r->$elem$sel$pst;\n"; |