-
-
Save shelling/2214407 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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