in reply to Can you help me understand this OO notation/issue?

G'day mr.nick,

It looks like you've resolved your posted question with ++choroba's help.

As you "do very, very little OOP in Perl", I thought I'd draw your attention to the parent pragma which is used to "Establish an ISA relationship with base classes at compile time".

Using this pragma, your code might look at little more straightforward written along these lines:

$ perl -Mstrict -Mwarnings -E ' package Event; sub new { my $class = shift; my $self = { EventType => "Windows 2003", @_ }; bless $self => ref $class || $class; } package Event08; use parent qw{-norequire Event}; sub new { shift->SUPER::new(EventType => "Windows 2008", @_); } package Security; use parent qw{-norequire Event}; sub new { shift->SUPER::new(EventLog => "Security", @_); } package Security08; use parent qw{-norequire Event08}; sub new { shift->SUPER::new(EventLog => "Security", @_); } package main; my $sec = Security::->new(some_attribute => "abc"); say "Class: ", ref $sec; say "EventType: ", $sec->{EventType}; say "EventLog: ", $sec->{EventLog}; say "Some attribute: ", $sec->{some_attribute}; my $sec08 = Security08::->new(some_attribute => "xyz"); say "Class: ", ref $sec08; say "EventType: ", $sec08->{EventType}; say "EventLog: ", $sec08->{EventLog}; say "Some attribute: ", $sec08->{some_attribute}; ' Class: Security EventType: Windows 2003 EventLog: Security Some attribute: abc Class: Security08 EventType: Windows 2008 EventLog: Security Some attribute: xyz

Notes:

-- Ken