in reply to Re: replace conditionals with polymorphism
in thread replace conditionals with polymorphism

package UI; our @ISA = '';

Careful; you've just inherited from a class with no name.

Replies are listed 'Best First'.
Re^3: replace conditionals with polymorphism
by Corion (Patriarch) on Feb 10, 2009 at 08:29 UTC

    You likely know this, but others mightn't:

    Perl provides the class with no name. It's identical to the main:: namespace:

    package Hello; @Hello::ISA=''; package main; sub p { print for @_ }; Hello->p('World')