CSS::DOM::Util - Utility functions for dealing with CSS tokens
Version 0.14
use CSS::DOM::Util ':all'; # or: use CSS::DOM::Util qw[ escape unescape escape_ident unescape_url escape_str unescape_str ];
This module provides utility functions for dealing with CSS tokens.
All functions below that take one argument have a ($) prototype, so they have the same precedence as closedir and delete.
($)
closedir
delete
This escapes any characters in $string that occur in $chars_to_escape, which is interpreted as a regular expression. The regexp must consume just one character; otherwise you'll find chars missing from the output. ASCII vertical whitespace (except the vertical tab) is always escaped.
$string
$chars_to_escape
Printable non-alphanumeric ASCII characters and the space character are escaped with a single backslash. Other characters are encoded in hexadecimal.
escape also considers that you might want to include the escaped string in a larger string, so it appends a space if the escaped string ends with a hexadecimal escape with fewer than six digits.
escape
This turns something like \"H\65llo\" into "Hello" (including quotes).
This escapes $string as a CSS identifier, escaping also any characters matched by $more_chars_to_escape.
$more_chars_to_escape
Returns the URL that the token represents.
Returns a CSS string token containing $string (within quotes; characters possibly escaped).
Returns the value that a CSS string token represents.
CSS::DOM
To install CSS::DOM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CSS::DOM
CPAN shell
perl -MCPAN -e shell install CSS::DOM
For more information on module installation, please visit the detailed CPAN module installation guide.