DevexpressHelpers.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond 50.0% 2 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 88.8% 32 / 36 CC 3 SCAR 5.7
CC
3
Cov
93%
register
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« DevexpressHelpers/Helpers.pm ↑ Summary
1 package Mojolicious::Plugin::DevexpressHelpers;
2 7 $Mojolicious::Plugin::DevexpressHelpers::VERSION = '0.163572';
3 #ABSTRACT: Add some helpers to add and configure Devexpress controls
4 7 ▶use Modern::Perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use Mojo::Base 'Mojolicious::Plugin';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 ▶use Mojolicious::Plugin::DevexpressHelpers::Helpers;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 7 ▶use MojoX::AlmostJSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9  
10  
11  
12 6 ▶sub register {
Subroutine register: called CC=3 SCAR=11.1
Pod documented
13 6 my ( $self, $app, $args ) = @_;
14  
15 6 ▶ $args->{'tag_camelcase'} //= 1;
Condition50%1/2
$args->{"tag_camelcase"} //= 1
l!l
06
MC/DC0%0/1
$args->{"tag_camelcase"} //= 1
$args->{"tag_camelcase"}
Truth table50%1/2
A
A= $args->{"tag_camelcase"}
Aresult
11
00
16 6 ▶ $args->{'tag_prefix'} //= 'dx';
Condition50%1/2
$args->{"tag_prefix"} //= "dx"
l!l
06
MC/DC0%0/1
$args->{"tag_prefix"} //= "dx"
$args->{"tag_prefix"}
Truth table50%1/2
A
A= $args->{"tag_prefix"}
Aresult
11
00
17 6 Mojolicious::Plugin::DevexpressHelpers::Helpers->register( $app, $args );
18  
19 #make json boolean easier to write within templates
20 6 $app->helper( 'true' => \&MojoX::AlmostJSON::true );
21 6 $app->helper( 'false' => \&MojoX::AlmostJSON::false );
22  
23 $app->hook(
24 12 ▶ before_dispatch => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
25 12 my $c = shift;
26  
27 #create a new object that will help to generate binding for dx controls
28 12 $c->stash( 'dxHelper' =>
29 Mojolicious::Plugin::DevexpressHelpers::Helpers->new );
30 }
31 6 );
32  
33 }
34  
35  
36 7 1; # End of Mojolicious::Plugin::DevexpressHelpers
37  
38 __END__
« DevexpressHelpers/Helpers.pm ↑ Summary