- elsif (m{^(?=$caps_re)}) { o $var_prefix }
- elsif (s{^([,;]?)(?=$lc_re)}{}) { o $pfxmap{$1} }
- elsif (s{^_}{}) { o $var_prefix }
- elsif (s{^=_}{}) { o $var_prefix }
- elsif (s{^([,;]?)/}{}) { o $pfxmap{$1} }
- elsif (s{^=/}{}) { o $dir_name }
- elsif (s{^([,;]?)(?=[ \t])}{}) {
- my $prefix = $pfxmap{$1} // die;
+ if (s{^\\$esc}{}) { od "$$esclitr" }
+ elsif (s{^\\\$}{}) { oud '$' }
+ elsif (s{^\\\s+$}{}) { }
+ elsif (s{^$esc}{}) { od "$$esclitr$$esclitr" }
+ elsif (m{^(?=$caps_re)}) { od $var_prefix }
+ elsif (s{^\$([A-Za-z]\w+)}{}) {
+ $note_varref->($1,1);
+ od "\${${var_prefix}$1}";
+ }
+ elsif (s{^([~^]?)(?=$lc_re)}{}) { od $pfxmap{$1} }
+ elsif (s{^_}{}) { od $var_prefix }
+ elsif (s{^=}{}) { od $var_prefix_name }
+ elsif (s{^([~^]?)/}{}) { od $pfxmap{$1} }
+ elsif (s{^\.}{}) { od $dir_name }
+ elsif (s{^([~^])\.}{}) { od $srcdirmap{$1} }
+ elsif (s{^\$\-}{}) { $ddbl=undef; }
+ elsif (s{^\$\+}{}) { $ddbl=1; }
+ elsif (s{^\$\(}{}) {
+ ddbl_only($&); oud "\${";
+ $note_varref->($2,!!$1) if m{^($esc)?([^()\$]+\))};
+ }
+ elsif (s{^\$(\d+)}{}) { ddbl_only($&); oud "\${$1}"; }
+ elsif (s{^\$\{}{}) {
+ err 'macro invocation cannot be re-$-doubled' if $ddbl;
+ od '${eval ${call ';
+ $evalcall_brackets = 1;
+ $push_nest->('eval',1, '&${...}');
+ $note_varref->($2,!!$1) if m{^\s*($esc)?([^,{}\$]+)};
+ } elsif (s{^([~^]?)(?=[ \t])}{}) {
+ my $prefix = $pfxmap{$1} // die "internal error ($1?)";