| 1 | package Mojolicious::Plugin::Prove::Base; | ||
| 2 | 8 | $Mojolicious::Plugin::Prove::Base::VERSION = '0.11'; | |
| 3 | # ABSTRACT: Base class for Mojolicious::Plugin::Prove | ||
| 4 | |||
| 5 | 8 | ▶ | use Mojo::Base 'Mojolicious::Plugin'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 8 | ▶ | use Cwd 'abs_path'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 8 | has 'prefix'; | |
| 10 | 8 | has 'conf'; | |
| 11 | |||
| 12 | 8 | ▶ | sub add_template_path { |
|
Subroutine
add_template_path: called CC=1 SCAR=0.0
Pod
documented
| |||
| 13 | 8 | my ($self, $renderer, $class) = @_; | |
| 14 | |||
| 15 | 8 | $class =~ s{::}{/}g; | |
| 16 | 8 | $class .= '.pm'; | |
| 17 | |||
| 18 | 8 | my $public = abs_path $INC{$class}; | |
| 19 | 8 | $public =~ s/\.pm$//; | |
| 20 | |||
| 21 | 8 | push @{$renderer->paths}, "$public/templates"; | |
| 22 | } | ||
| 23 | |||
| 24 | 8 | 1; | |
| 25 | |||
| 26 | __END__ | ||