Then fix the @ISA assignment by using parent.
#!/usr/bin/perl use strict; use warnings; use autodie; use IO::Dir; my $dh = IO::Dir::pl->new('.'); while (my $file_name = $dh->read){ print STDOUT "$file_name\n"; } package IO::Dir::pl; use parent -norequire, qw(IO::Dir); sub read{ my $self = shift; warn "Ok We got here.\n"; return undef; }
In reply to Re: My first attempt at inheritance
by Anonymous Monk
in thread My first attempt at inheritance
by BillKSmith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |