package Agent my $Utils = new Tools; sub new { my ($caller, %args) = @_; my $caller_is_obj = ref($caller); my $class = $caller_is_obj || $caller; my $self = bless [], $class; return $self; } sub checkPackage { my $this = shift; my $package = "SB"; opendir(DIR, "D:/\box/\/\somthing/\SB") or $Utils->DIRUtil( "D:\/box\/something", "SB", "-c"); }