URI::Find::UTF8::ExtraCharacters - URI::Find::UTF8 with optional extra characters.
my $finder = URI::Find::UTF8::ExtraCharacters->new( sub { my ( $uri_obj, $url ) = @_; return "$uri_obj"; }, extra_characters => ['|'], ); my $text = "link to zombo: http://zombo.com/lorem|ipsum?queryparam=queryval"; $finder->find(\$text); say $text; #link to zombo: http://zombo.com/lorem%7Cipsum?queryparam=queryval
The web is a wacky place full of screwed up URLs. This is a drop in replacement for URI::Find::UTF8 ( Which is a drop in replacement for URI::Find ) which allows you to pass in additional characters that URI::Find thinks are bogus. ( like '|' )
my $finder = URI::Find::UTF8::ExtraCharacters->new(\&callback, extra_characters => \@chars );
Creates a new URI::Find::UTF8::ExtraCharacters object.
This module does not export 'find_uris,' which URI::Find does but URI::Find::UTF8 does not.
Samuel Kaufman, skaufman-at-cpan.org
Copyright 2014 by Samuel Kaufman
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F<http://www.perlfoundation.org/artistic_license_1_0>
To install URI::Find::UTF8::ExtraCharacters, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URI::Find::UTF8::ExtraCharacters
CPAN shell
perl -MCPAN -e shell install URI::Find::UTF8::ExtraCharacters
For more information on module installation, please visit the detailed CPAN module installation guide.