Created
October 20, 2012 14:43
-
-
Save rblackwe/3923461 to your computer and use it in GitHub Desktop.
Disambiguation Costs Nothing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=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