in reply to invoking subroutines

always passes $str as parameter to the subroutine..

Yes - $str is the *second* argument that gets passed. The first argument will be the package name. Here's a demo:
use warnings; use strict; package MY_FOO; my $str = 'this is the second argument'; MY_FOO->foo($str); sub foo { print "$_\n" for @_; } __END__ prints: MY_FOO this is the second argument
(I haven't dug into your code - I'm merely guessing that this is what's happening.)

Cheers,
Rob