File: Compilation.pm

package info (click to toggle)
libmason-perl 2.24-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 748 kB
  • sloc: perl: 4,882; makefile: 7
file content (12 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
package Mason::Plugin::DollarDot::Compilation;
$Mason::Plugin::DollarDot::Compilation::VERSION = '2.24';
use Mason::PluginRole;

after 'process_perl_code' => sub {
    my ( $self, $coderef ) = @_;

    # Replace $. with $self->
    $$coderef =~ s/ \$\.([^\W\d]\w*) / \$self->$1 /gx;
};

1;