in reply to Is this safe to export and import functions this way?

EDIT: Also am I right in thinking that the reason this works is because I am calling that specific module with keys %My::Package::. If i am wrong please help me understand... more better :)
As a partial answer to this question, I've changed your module as follows:
# ... use Exporter qw(import); @EXPORT = (keys %My::Package::); # @EXPORT instead of @EXPORT_OK # ...
And then I can run the test program without specifying the list of symbols to be imported:
$ perl -e ' use strict; use warnings; use My::Package; test("hello world\n"); test_2("hello this is dog"); ' hello world hello this is dog
So it seems that the work is really done within the module, which is exporting its symbols.