File: Plugin.pm

package info (click to toggle)
libbot-training-perl 0.07-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 144 kB
  • sloc: perl: 176; makefile: 11
file content (22 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package Bot::Training::Plugin;
our $AUTHORITY = 'cpan:AVAR';
$Bot::Training::Plugin::VERSION = '0.07';
use 5.010;
use Moose;
use File::ShareDir qw< :ALL >;
use File::Spec::Functions qw< catdir catfile >;
use namespace::clean -except => 'meta';

sub file {
    my ($self) = @_;

    my $class = ref $self;
    my ($last) = $class =~ m[::([^:]+)$];
    $class =~ s[::][-]g;

    my $file = dist_file( $class, lc($last) . '.trn');

    return $file;
}

__PACKAGE__->meta->make_immutable;