sub foo { print 'Foo!' }; sub bar { foo(); }; bar(); { local *foo = sub { print 'Foo! reloaded!'; }; bar(); }