The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use Test::More tests=>1;
use strict;
use SVG;

my $svg=new SVG(-extension => "<!ENTITY % myentity \"myvalue\">");
$svg->group->text->cdata("Extensions");
my $xml=$svg->render;

    ok($xml=~/[\n<!ENTITY % myentity "myvalue">\n]>/,"ENTITY myentity myvalue");