| 1 | package Mason::Plugin::DollarDot::Compilation; | ||
| 2 | $Mason::Plugin::DollarDot::Compilation::VERSION = '2.23'; | ||
| 3 | use Mason::PluginRole; | ||
| 4 | |||
| 5 | after 'process_perl_code' => sub { | ||
| 6 | my ( $self, $coderef ) = @_; | ||
| 7 | |||
| 8 | # Replace $. with $self-> | ||
| 9 | $$coderef =~ s/ \$\.([^\W\d]\w*) / \$self->$1 /gx; | ||
| 10 | }; | ||
| 11 | |||
| 12 | 1; |