in reply to Re^2: print statements in perl pakages seem to be masked from STDOUT
in thread print statements in perl pakages seem to be masked from STDOUT

In a module, supporting code (not in subroutines) should get run when you use the module, so I would have expected the "What is the value of var_in_package" to print when you ran use ThisPackage;. For example:

#./ThisPackage.pm package ThisPackage; sub new { local $, = ", "; local $\ = "\n"; print __PACKAGE__."::new(@_)"; } print "Dummy code gets run at compile/use time\n"; 1;
#./pkg.pl BEGIN { print "this should print before\n" } use lib '.'; use ThisPackage; ThisPackage::new(qw/hello world/); BEGIN { print "this should print after the use, but before the new\n" +}
# output this should print before Dummy code gets run at compile/use time this should print after the use, but before the new ThisPackage::new(hello world)

Does my code do the same for you? If so, maybe it will help you figure out what's wrong with your code.

specifically, if you want to print values inside the package's functions, you have to include the prints inside. If you put prints outside the functions in the package, they will only execute the once, and none of the package's functions will have been run yet, so probably won't have changed package variables (assume that's what you're expecting)