Hi Renée,
thank you for your bug report. I could reproduce the problem.
On Fri Jun 04 04:33:31 2010, RENEEB wrote:
Show quoted textgenial</text>
Show quoted text> </svg>
The bug has two aspects:
1) I have not tried SVG::Parser intensively. Therefore I was not aware
that it already parses the value of the style attribute into a hash.
The code of SVG::Rasterize therefore treats the hash reference as a
scalar and when it tries to trim leading and trailing white space the
hash reference is turned into a string. Additionally to losing the
hash, a subsequent parameter validation then does not detect the
hashref any more.
2) After detection of an invalid style string 'HASH...', the exception
method is accidentally called as a subroutine instead of as a method
which leads to the weird error message.
I have fixed both bugs and will release a new version soon. As a
workaround, you could use the stroke attribute instead of the style
attribute like this:
<svg xmlns="
http://www.w3.org/2000/svg"
xmlns:xlink="
http://www.w3.org/1999/xlink">
<text x="20" y="100" stroke="rgb(0, 0, 0)">Perl ist genial</text>
</svg>
However, there are two more problems:
1) Currently, SVG::Rasterize only understands rgb color settings, no
hex values. This is not documented, I'm sorry. I will fix that. In the
example above, I have already replaced '#000000' by 'rgb(0, 0, 0)'.
2) SVG::Rasterize does not rasterize text, yet. Therefore, your example
will produce an empty image. At least, this is documented for a change,
uff ;-). I am currently working on it, it's the main goal for version
0.004. Currently, only paths and basic shapes are supported.
Thanks for trying SVG::Rasterize and for reporting the bug
Lutz
P.S.: You have indicated that the bug occurred in version 0.003000.
This version has another problem which is already fixed in 0.003001.
Please upgrade.