Subject: | small code cleanup [PATCH] |
Hi,
as parent is supposed to be (afaik) a nice and clean reimplementation of
base, I'm wondering what @filenames is used for. It is anyway confusing
when reading the source.
I also think that '&&' is more appropriate than 'and' in a test
expression, due to operators priorities, even if in this case, it
doesn't change anything at all.
Maybe I'm just on crack and 'my @filename =' is useful, in this case I
wonder why, and a comment could be useful :)
patch attached
Thanks
Subject: | parent_cleanup.patch.txt |
--- parent.pm_orig 2008-05-14 15:35:13.000000000 +0000
+++ parent.pm 2008-05-14 15:35:30.000000000 +0000
@@ -8,10 +8,10 @@
my $inheritor = caller(0);
- if ( @_ and $_[0] eq '-norequire' ) {
+ if ( @_ && $_[0] eq '-norequire' ) {
shift @_;
} else {
- for ( my @filename = @_ ) {
+ for ( @_ ) {
if ( $_ eq $inheritor ) {
warn "Class '$inheritor' tried to inherit from itself\n";
};