Perl6ish::Syntax::DotMethod - Allow methods to be invoked with dot.
package Cow; use Perl6ish::Syntax::DotMethod; sub new { bless {}, shift } sub sound { "moooo" }; package main; my $animal = new Cow; # Cow methods can be invoked with dot. print "A cow goes " . $animal.sound();
This syntax extension allows your instance methods to be invked with a dot. It is only supposed to be used when you're defining classes. It does not turn all objects methods invokable with a dot.
It's not source-filtering, but operator overloading. Under the hood, the real work is done in Acme::Dot.
Kang-min Liu <gugod@gugod.org>
Acme::Dot
To install Perl6ish, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl6ish
CPAN shell
perl -MCPAN -e shell install Perl6ish
For more information on module installation, please visit the detailed CPAN module installation guide.