Hello, I am tired and my brain is having a short circuit. Why does adding the import method break the program? It looks strange to me too, but when I leave the method out, it seems to work...
# Foo package Foo ; require Exporter ; our @ISA = qw( Exporter ) ; our @EXPORT_OK = qw( saySomethingElse ) ; # Add this method and it breaks # sub import { # my $this = shift ; # $this->SUPER::import( @_ ) ; # } sub saySomethingElse { print "Bye World!\n" ; } 1 ;
Thanks# main use Foo qw ( saySomethingElse ) ; saySomethingElse() ;
In reply to Exporter. Correct way to override import? by Veltro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |