3 die("I only understand docbook\n") unless @ARGV && $ARGV[0] eq 'docbook';
11 my $ii = '<emphasis>';
12 my $io = '</emphasis>';
14 my $si = '<emphasis role="strong">';
15 my $so = '</emphasis>';
23 if (/^(.*)(\s*\/\*.*?\*\/\s*?)$/) {
27 if (/^(my\s+)(.*?)$/) {
35 if (!/^[a-zA-Z0-9_]+$/) {
38 s/(?<=[^a-zA-Z_\&:\.\'\";])(?!solv\W|Solv\W|Pool\W)([\$\@a-zA-Z_][a-zA-Z0-9_]*)(?=[^a-zA-Z0-9_\(;\[])(?!::)(?! [^=])/<-S><I>$1<-I><S>/g;
39 # fixup for perl bare words
40 s/{<-S><I>([a-zA-Z_][a-zA-Z0-9]*)<-I><S>}/{$1}/g;
41 # fixup for callbackfunctions
42 s/\\(&[a-zA-Z_]+)/\\<-S><I>$1<-I><S>/;
43 # fixup for stringification
44 s/\$<-S><I>/<-S><I>\$/g;
46 s/%<-S><I>d<-I><S>\"/%d\"/;
47 s/%<-S><I>d<-I><S>\\<-S><I>n<-I><S>/%d\\n/;
51 s/^(for (?:my )?)(\S+) /$1<-S><I>$2<-I><S> /;