perl accessing my variables from another file
===

we have at work a perl script which is used to perform maintenance, i needed to modify it to handle more tasks, the problem is that the script is compiled and the source was lost long ago.

I tried to use B::Deparse in order to recreate the file but Deparse is not perfect and the output is broken (and very large ~5000 lines of deparsed code). 

after reading the deparsed code i found that i need to modify one function. the compiled script loads a plain-text script module, so i altered the module to override the function and perform the task i need it to perform. the problem now is that i cannot access the main script "my" variables.
here's an example:

    main.pl
    my $a = 1;
    
    sub call_me {
        print "unmodified";
    }
    
    use MOD;
    
    call_me;
    
    
    MOD.pm
    Package MOD;
    
    main::{'call_me'} = sub {
        print "\$main::a = $main::a\n";
    }


the result is: "$main::a = " instead of getting the real value
thanks in advance