You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a case where URI->new() behaves weirdly. If URI::tel (which doesn't inherit from URI) is installed, then it will build the wrong object:
my$uri = URI->new('tel:+16045551234');
print Dumper($uri);
print$uri->scheme();
__END__OUTPUT:$VAR1 = bless( { 'telephone_uri' => 'tel:tel:+16045551234' }, 'URI::tel' );Can't locate object method "scheme" via package "URI::tel" at test.pl line 11.
The bug is really that URI::tel should be in a different namespace. But short of that, URI could probably check that any scheme-specific classes are subclasses before using them.
Cheers!
The text was updated successfully, but these errors were encountered:
nfg
added a commit
to nfg/URI
that referenced
this issue
Mar 7, 2018
Hello!
I ran into a case where
URI->new()
behaves weirdly. If URI::tel (which doesn't inherit from URI) is installed, then it will build the wrong object:The bug is really that URI::tel should be in a different namespace. But short of that, URI could probably check that any scheme-specific classes are subclasses before using them.
Cheers!
The text was updated successfully, but these errors were encountered: