Skip to content

Instantly share code, notes, and snippets.

@moritz
Created August 1, 2011 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/1118159 to your computer and use it in GitHub Desktop.
Save moritz/1118159 to your computer and use it in GitHub Desktop.
Prototyping methods outside of src/core/
class MyStr is Str {
method capitalize(MyStr:D:) {
# put your implementation here
self.uc;
}
}
my $str = pir::repr_box_str__PsP('Just a test', MyStr);
say $str.capitalize;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment