package Foo::Bar; sub baz { print "I am the original!\n" } package main; sub Foo::Bar::baz { print "I am the new baz!\n" } Foo::Bar::baz();