Skip to content

Instantly share code, notes, and snippets.

@sartak
Created July 5, 2010 03:56
Show Gist options
  • Save sartak/463980 to your computer and use it in GitHub Desktop.
Save sartak/463980 to your computer and use it in GitHub Desktop.
# see http://gist.github.com/463974
use MooseX::Declare;
use 5.12.0;
if (shift eq 'ujihisa') {
class Ujihisa {
method hi {
'my name is ujihisa'
}
}
*the_klass = sub { 'Ujihisa' }
}
else {
class Ujm {
method hi {
'this is a pen'
}
}
*the_klass = sub { 'Ujm' }
}
say the_klass()->new->hi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment