in reply to Re^2: Hitting head against wall over Readonly compilation errors
in thread Hitting head against wall over Readonly compilation errors

Is the Readonly module forcing the variables into the global space? Surely that would be something terrible.

No. perldoc -f our 'our' is not 'my'

Replies are listed 'Best First'.
Re^4: Hitting head against wall over Readonly compilation errors
by SilasTheMonk (Chaplain) on Sep 12, 2009 at 14:14 UTC
    Okay it's starting to make sense. The following does what I would expect:
    use Readonly; sub testvalue { Readonly my %hash => {h =>1}; return \%hash; } my $h = testvalue(); $h->{h} = 2;