use strict; use warnings; use threads; use threads::shared; use APP::Plugin; use Data::Dumper; my %hsh : shared = ( 'a' => 1 ); my $thread = threads->create( \&subrt, %hsh ); $thread->join(); sub subrt { my %args = @_; print APP::Plugin->execute(%hsh); } #Code for Plugin module package APP::Plugin; use strict; use warnings; sub execute { my $class = shift(); my %abc = @_; foreach (keys %abc) { print $_. "---" . $abc{$_}."\n"; } } 1;