Skip to content

Instantly share code, notes, and snippets.

@rblackwe
Created October 20, 2012 14:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rblackwe/3923461 to your computer and use it in GitHub Desktop.
Save rblackwe/3923461 to your computer and use it in GitHub Desktop.
Disambiguation Costs Nothing
=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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment