Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the non-existent URI::javascript is loaded, $@ is left populated. It is cleared out the first time by loading URI::_foreign, but the second time around nothing clears it.
- Loading branch information
1 parent
23d01eb
commit 37dc0db
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More; | ||
use URI; | ||
|
||
plan skip_all => 'this test assumes that URI::javascript does not exist' | ||
if eval 'require URI::javascript'; | ||
plan tests => 4; | ||
|
||
for (0..1) { | ||
my $uri = URI->new('javascript://foo/bar'); | ||
|
||
is($@, '', 'no exception when trying to load a scheme handler class'); | ||
ok($uri->isa('URI'), 'but URI still instantiated as foreign'); | ||
} |