Skip to content

Instantly share code, notes, and snippets.

@shelling
Created March 27, 2012 09:38
Show Gist options
  • Select an option

  • Save shelling/2214407 to your computer and use it in GitHub Desktop.

Select an option

Save shelling/2214407 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use Modern::Perl;
use MooseX::Declare;
class Person {
has name => (
is => "rw",
isa => "Str",
);
method hello_to ( Str $name ) {
say $self->name . " says hello to $name!";
}
}
my $shelling = Person->new(
name => "shelling",
);
$shelling->hello_to("rob");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment