Silki/AppRole/Tabs.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 42 CC 2 SCAR 10.6
CC
2
Cov
0%
add_tab
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.9
1 package Silki::AppRole::Tabs;
2 {
3 $Silki::AppRole::Tabs::VERSION = '0.29';
4 }
5  
6 use strict;
7 use warnings;
8 use namespace::autoclean;
9  
10 use Scalar::Util qw( blessed );
11 use Silki::Web::Tab;
12 use Tie::IxHash;
13  
14 use Moose::Role;
15  
16 has _tabs => (
17 is => 'ro',
18 isa => 'Tie::IxHash',
19 lazy => 1,
20 default => sub { Tie::IxHash->new() },
21 init_arg => undef,
22 handles => {
23 tabs => 'Values',
24 _add_tab => 'Push',
25 tab_by_id => 'FETCH',
26 },
27 );
28  
29 sub add_tab {
30 my $self = shift;
31 my $tab = shift;
32  
33 $tab = Silki::Web::Tab->new( %{$tab} )
34 unless blessed $tab;
35  
36 $self->_add_tab( $tab->id() => $tab );
37 }
38  
39 1;
40  
41 # ABSTRACT: Adds tab-related methods to the Catalyst object
42  
43 __END__