| 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
MC/DC0%0/1
$args->{"tag_camelcase"} //= 1
$args->{"tag_camelcase"}
Truth table50%1/2
A
A= $args->{"tag_camelcase"}
| |||||||||||||
| 16 | 6 | ▶ | $args->{'tag_prefix'} //= 'dx'; | ||||||||||
|
Condition50%1/2
$args->{"tag_prefix"} //= "dx"
MC/DC0%0/1
$args->{"tag_prefix"} //= "dx"
$args->{"tag_prefix"}
Truth table50%1/2
A
A= $args->{"tag_prefix"}
| |||||||||||||
| 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__ | ||||||||||||