Acme-Dot

 view release on metacpan or  search on metacpan

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();
BEGIN { Foo->import(); };

our $testobj = new Foo;
$testobj.test1(1,2,3);

my $y = "not an object";
is($y.test2(1), "not an object1", "Non-objects still work");

sub test2 {
    is(@_, 1, "Args passed");
    return 1
}



( run in 1.545 second using v1.01-cache-2.11-cpan-5a3173703d6 )