Lutz Gehlen > SVG-Rasterize > SVG::Rasterize::Regexes

Download:
SVG-Rasterize-0.003008.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.003007   Source  

NAME ^

SVG::Rasterize::Regexes - Commonly used regular expressions

VERSION ^

Version 0.003007

DESCRIPTION ^

This package offers a set of regular expressions for export. Many of them are precompiled into downstream expressions, therefore changing them would probably not have the desired outcome. Therefore they are also not documented in full detail, see the code for the details.

A versus P

Floating point number expressions are divided into A (for attribute) and P (for property) versions, e.g. $RE_NUMBER{A_FLOAT} and $RE_NUMBER{P_FLOAT}. The reason for that is that apparently, the CSS specification prohibits floating point numbers in scientific notation (e.g. 3e-7). However, the XML standard allows such numbers in attribute values. Currently, however, SVG::Rasterize does not make use of this distinction and always uses the A version. Therefore, it will not complain if you provide a number in scientific notation within a style attribute although strictly, this is forbidden by the specification. This may or may not change in the future.

p, w, and s

The regular expressions from this package might be used to build more complex expressions, but are also used to validate values which should match the expression fully (not a substring). Therefore, some expressions have p (for pure) and w (for white space) versions. If $RE is an expression then $p_RE will be qr/^$RE$/, and $w_RE will be qr/^$WSP*$RE$WSP*$/.

The validation expressions for path data and points lists of polyline and polygon elements also have a s (for start) version. The background is that they are supposed to be rendered up to the erroneous part. If they match fully is only found out when they are split up into parts.

LIST OF EXPRESSIONS ^

Two expressions are exported directly as scalars, the other ones are organized in a set of hashes:

EXPORT_TAGS ^

The following export tags can be used like

  use SVG::Rasterize::Regexes qw(:whitespace);

SEE ALSO ^

AUTHOR ^

Lutz Gehlen, <perl at lutzgehlen.de>

LICENSE AND COPYRIGHT ^

Copyright 2010 Lutz Gehlen.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: