15 Jul 2012 11:22:36 UTC
- Distribution: Text-Filter-URI
- Module version: 0.03
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (351 / 0 / 0)
- KwaliteeBus factor: 0
- 64.81% Coverage
- License: perl_5
- Activity24 month
- Download (4.23KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionPERLER Moritz Onkenand 1 contributors
- Moritz Onken
Text::Filter::URI - Filter a string to meet URI requirements
Use either the exported function or the OO interface:
use Text::Filter::URI qw( filter_uri ); my $uri = filter_uri("A text which needs to be filtered "); # $uri = "a-text-which-needs-to-be-filtered" my $f = Text::Filter::URI->new(input => $input, output => $output); $f->filter;
See Text::Filter for details on
This method can be exported using use Text::Filter::URI qw( filter_uri );
It expects a string or an array of strings and returns the filtered strings accordingly.
These methods are used for the OO interface. This allows you to use the full power of Text::Filter.
newtakes a hash for configuration. See "CONSTRUCTOR" in Text::Filter for more information on these settings.
There is one additional parameter:
Define an individual string for separating the words. Defaults to
Call this method after calling
newto actually filter the
Unicode characters get encoded to their ascii equivalents using the Text::Unidecode. This module maps characters like
�to the ascii character
a. This method contains several regular expressions which convert every not word character (
\W) and the underscore to a blank. Blanks at the beginning and the end are removed. All remaining blanks are replaced by the separator (defaults to
-). Then it creates a lowercased version of the string.
Please report any bugs or feature requests to
bug-text-filter-uri at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Filter-URI. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Copyright 2008 Moritz Onken, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Text::Filter::URI, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Text::Filter::URI
For more information on module installation, please visit the detailed CPAN module installation guide.