package MyConfig::P; sub new { my( $class, $val ) = @_; my $self = {}; $self->{config} = $val; bless $self, $class; } sub sss { my $self = shift; print $self->{config}{Local_IP}, "\n"; } sub ppp { my $self = shift; print $self->{config}{Local_Port}, "\n"; } 1;