in reply to Reopening builtin classes, redefining builtin functions?
{ no strict 'refs'; *{ "UNIVERSAL::to_yaml" } = sub { # Put some code here. }; }
Some functions require you to redefine in CORE::GLOBAL:: instead. There's no real rhyme or reason (from the outside looking in) - you can find more by looking at the appropriate documentation.{ no strict 'refs'; *{ "CORE::<funcname>" } = sub { ... }; }
|
|---|