package Gallery::Category; use strict; my $VERSION = '1.0'; use Class::Std::Utils; use Carp; use base qw( Gallery ); ### s -- vars used in this package my %id_of; ### e sub new { my ($class, $arg_ref) = @_; my $new_object = $class->SUPER::new($arg_ref); my $ident = ident $new_object; ### extract inits from arguments: my %init = extract_initializers_from($arg_ref); ### insert known parameters $id_of{$ident} = $init{'id'}; return $new_object; }