Skip to content

Instantly share code, notes, and snippets.

@shelling
Created August 19, 2009 16:56
Show Gist options
  • Save shelling/170458 to your computer and use it in GitHub Desktop.
Save shelling/170458 to your computer and use it in GitHub Desktop.
modifying symbol table at runtime
#!/usr/bin/evn perl
# this simple script demostrate modifying symbol table at runtime
use 5.010;
package Hello;
sub hello {
"hello";
}
package main;
say Hello->hello;
*{Hello::hello} = sub {
"modified";
};
say Hello->hello;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment