File: Attribute.pm

package info (click to toggle)
libmoosex-app-perl 1.41-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 764 kB
  • sloc: perl: 4,004; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 752 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ============================================================================
package MooseX::App::Plugin::MutexGroup::Meta::Attribute;
# ============================================================================

use Moose::Role;
use namespace::autoclean;

has 'mutexgroup' => (
    is  => 'ro',
    isa => 'Str',
);

around 'cmd_tags_list' => sub {
    my $orig = shift;
    my ($self) = @_;

    my @tags = $self->$orig();

    push(@tags,'MutexGroup')
        if $self->can('mutexgroup')
        && $self->mutexgroup;

    return @tags;
};

{
    package Moose::Meta::Attribute::Custom::Trait::AppMutexGroup;

    use strict;
    use warnings;

    sub register_implementation { return 'MooseX::App::Plugin::MutexGroup::Meta::Attribute' }
}

1;