package T4; # Pragmas use strict; use warnings; use version; our $VERSION = qv('3.0.0'); use feature qw(:5.10); # Standard Modules use Data::Dumper qw(Dumper); use Class::Std::Utils qw( ident anon_scalar ); my %Attr_Name_Env; my %Attr_Remote; use T4::MyMod { Href_Attr_Name_Env => \%Attr_Name_Env, Href_Attr_Remote => \%Attr_Remote, }, qw( t_set_remote t_hello_world ) ; ## Main ## ## Constructor 'new' # sub new { ## Get and confirm arguments # my $class = shift; my $href_arg = {@_}; my $name_env = $href_arg->{'name_env'}; ## Bless anon scalar into class # my $obj_new = bless anon_scalar(), $class; my $idx_self = ident $obj_new; ## Create object attributes # $Attr_Name_Env{ $idx_self } = $name_env; return $obj_new; } ## END Constructor 'new' ## DESTROY # sub DESTROY { my $self = shift; my $idx_self = ident $self; delete $Attr_Name_Env{ $idx_self }; print STDERR qq(\nDestroyed ) . __PACKAGE__ . qq( object $idx_self\n\n); } ## END DESTROY sub t_get_name_env { my $self = shift; my $idx_self = ident $self; return $Attr_Name_Env{ $idx_self }; } sub t_get_remote { my $self = shift; my $idx_self = ident $self; return $Attr_Remote{ $idx_self }; } ## End Main ## 1;