public

Disambiguation Costs Nothing

  • Download Gist
Disambiguation_Costs_Nothing.t
Perl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
=pod
 
=head1 Disambiguation Costs Nothing
 
Reading http://blogs.perl.org/users/toby_inkster/2012/10/in-a-simple-mojoliciousdbi-example.html#comment-221718/
motivated me to extend the comments into this test.
 
=head1 COPYRIGHT AND LICENSE
 
Copyright (C) 2012 by Robert Blackwell
 
This writing is free; you can redistribute it and/or modify
it under the same terms as Perl itself.
 
=cut
 
use strict;
use Test::More;
 
use LWP::UserAgent;
use JSON;
 
sub JSON { return 'LWP::UserAgent' };
{
my $obj = JSON()->new;
isa_ok($obj, 'LWP::UserAgent');
}
 
{
my $obj = JSON::->new;
isa_ok($obj, 'JSON');
}
 
{
my $obj = 'JSON'->new;
isa_ok($obj, 'JSON');
}
 
{
my $obj = JSON->new;
isa_ok($obj, 'LWP::UserAgent');
}
 
done_testing;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.