--- suikawiki/script/bin/mkplugin2.pl 2004/04/25 07:06:50 1.16 +++ suikawiki/script/bin/mkplugin2.pl 2004/05/01 03:55:05 1.17 @@ -1,6 +1,6 @@ #!/usr/bin/perl use strict; -our $VERSION = do{my @r=(q$Revision: 1.16 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; +our $VERSION = do{my @r=(q$Revision: 1.17 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; require Message::Markup::SuikaWikiConfig20::Parser; { @@ -59,7 +59,14 @@ $code =~ s/\$$_\b/$Info->{const}->{$_}/ge; } $code =~ s/__FUNCPACK__/$Info->{module_name}/g; - $code =~ s/]+)>/literal $Info->{Namespace}->{$1}.$2/ge; + $code =~ s{]+)>}{ + if ($Info->{Namespace}->{$1}) { + literal $Info->{Namespace}->{$1}.$2; + } else { + warn qq(Namespace prefix "$1" not defined); + literal $2; + } + }ge; $Info->{-message_error_used} = 1 if $code =~ /\buse\s+Message::Util::Error\b/; if (not $Info->{-message_error_used} and @@ -750,4 +757,4 @@ =cut -1; # $Date: 2004/04/25 07:06:50 $ +1; # $Date: 2004/05/01 03:55:05 $