in reply to Re^2: OO in Perl 5: still inadequate
in thread OO in Perl 5: still inadequate

Apparently not; I was using a tutorial that was redefining classes as it went.

Apologies to Ruby for the undeserved criticism. But is there some way to freeze the class definition so it can't be changed at all?

I dislike giving other people plenty of rope to hang me with.

Replies are listed 'Best First'.
Re^4: OO in Perl 5: still inadequate
by Fletch (Bishop) on Jan 23, 2006 at 21:03 UTC

    Yup.

    ---------------------------------------------------------- Module#free +ze mod.freeze ---------------------------------------------------------------------- +-- Prevents further modifications to _mod_.

    And there's also Object#freeze which prevents modification of individual instances (preventing you from adding singleton methods to them).