XML::Twig constructor disregarding map_xmlns - bug in module?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

XML::Twig seems to disregard the map_xmlns argument. The warn
"matched!" never get's called. If I remove the map_xmlns and hardcode
the prefixes, then it works. But the whole point is that I don't want
to hardcode the prefixes and map_xmlns is supposed to be just for

use XML::Twig;
use strict;
my $twig = XML::Twig->new(
    map_xmlns => {
        "http://perlmonks.org "  => 'aaa',
        "http://perlmonks.org/blah "=> 'bbb'
    TwigHandlers => {
        '/aaa:monastery/aaa:foo/bbb:bar/bbb:monk' => sub { warn
"matched!"; $_[0]->purge; }

my $xml =<<XML;
<?xml version="1.0" encoding="UTF-8"?>
<prefix:monastery xmlns:prefix="http://perlmonks.org ">
    <prefix2:bar xmlns:prefix2="http://perlmonks.org/blah ">
       <prefix2:monk>Larry Wall</prefix2:monk>


Any ideas?


Site Timeline