Acme-Dot

 view release on metacpan or  search on metacpan

lib/Acme/Dot.pm  view on Meta::CPAN

__END__

=head1 NAME

Acme::Dot - Call methods with the dot operator

=head1 SYNOPSIS

  package Foo;
  use Acme::Dot;
  sub new { bless {}, shift }
  sub hello { print "Hi there! (@_)\n" }

  package main;
  my $x = new Foo;
  $x.hello(1,2,3); # Calls the method

  $y = "Hello";
  sub world { return " World!"}
  print $y.world(); # Behaves as normal

t/10dot.t  view on Meta::CPAN

package Foo;
#use Test::More 'no_plan';
use Test::More tests => 6;

BEGIN {
    chdir 't' if -d 't';
    unshift @INC => '../lib';
    use_ok('Acme::Dot') or die;
}

sub new { bless {}, shift }
sub test1 {
    my $obj = shift;
    isa_ok($obj, "Foo");
    is($obj, $main::testobj, "Object is what we expect");
    is_deeply(\@_, [1,2,3], "Args passed");
}

package main;

Test::More->import();



( run in 1.102 second using v1.01-cache-2.11-cpan-de7293f3b23 )