in reply to Re^5: Blessing with unknown classnames
in thread Blessing with unknown classnames

@Error::ISA = qw//; # "base class" for errors @BadInput::ISA = qw/Error/;

Neat! I guess this is some kind of "class autovivification" you are doing?

e.g. Throwable

I prefer to keep it simple and mooless

Replies are listed 'Best First'.
Re^7: Blessing with unknown classnames
by haukex (Archbishop) on Apr 02, 2021 at 11:26 UTC
    I guess this is some kind of "class autovivification" you are doing?

    Like I said, Perl's object system is very simple: ->isa('Error') (inherited from UNIVERSAL) is just looking up the inheritance tree, and the inheritance tree is defined by each package's @ISA, which is just an array of strings, so that's all I needed to define to make the "classes" "exist". perlmod is a good read on this topic.