package Gallery; use strict; my $VERSION = '1.0'; use Class::Std::Utils; use Carp; ### s -- vars used in this package my %known_parameters_of; my %session_of; my %outputtype_of; ### e sub new { my ($class, $arg_ref) = @_; my $new_object = bless anon_scalar(), $class; ### extract inits from arguments: my %init = extract_initializers_from($arg_ref); ### insert known parameters $known_parameters_of{ident $new_object} = $init{'parameters'}; $outputtype_of{ident $new_object} = $init{'parameters'}->{'OutputType'}; $session_of{ident $new_object} = $init{'session'}; return $new_object; }