Catalyst/Helper/Model/DataLocalize.pm

filter: Statementstmt 48.1% 13 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 2 totaltotal 48.5% 17 / 35 CC 1 SCAR 2.9
CC
1
Cov
48%
mk_compclass
2.0
mk_comptest
2.0
BEGIN
1.0
CRAP 1.3
« CatalystX/I18N/TraitFor/Response.pm ↑ Summary Catalyst/Helper/Model/Maketext.pm »
1 # ============================================================================
2 package Catalyst::Helper::Model::DataLocalize;
3 # ============================================================================
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Path::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use FindBin;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 0 ▶sub mk_compclass {
Subroutine mk_compclass: not called CC=1 SCAR=6.9
Pod undocumented
12 0 my ($self, $helper) = @_;
13  
14 0 my %args = ();
15  
16 0 my $basedir = Path::Class::Dir->new( $FindBin::Bin, '..', 'lib');
17 0 my $datalocalize_module = $helper->{app}.'::'.$helper->{name};
18  
19 0 my @path = split (/\:\:/,$datalocalize_module);
20 0 my $file = pop @path;
21  
22 0 my $datalocalize_dir = $basedir->subdir( join '/', @path );
23 0 my $datalocalize_file = $datalocalize_dir->file($file.'.pm');
24 0 $datalocalize_dir->mkpath();
25  
26 0 $helper->render_file('datalocalizeclass', $datalocalize_file->stringify, \%args);
27 0 $helper->render_file('modelclass', $helper->{file}, \%args);
28  
29 0 return 1;
30 }
31  
32 0 ▶sub mk_comptest {
Subroutine mk_comptest: not called CC=1 SCAR=6.9
Pod undocumented
33 0 my ($self, $helper) = @_;
34  
35 0 return $helper->render_file('modeltest', $helper->{test});
36 }
37  
38 =encoding utf8
39  
40 =head1 NAME
41  
42 Catalyst::Helper::Model::DataLocalize - Helper for DataLocalize models
43  
44 =head1 SYNOPSIS
45  
46 script/myapp_create.pl model DataLocalize DataLocalize
47  
48 =head1 DESCRIPTION
49  
50 Helper for the L<Catalyst> DataLocalize model.
51  
52 =head1 ARGUMENTS
53  
54 ./script/myapp_create.pl model <model_name> DataLocalize
55  
56 You need to sepecify the C<model_name> (the name of the model).
57  
58 =head1 AUTHOR
59  
60 Maroš Kollár
61 CPAN ID: MAROS
62 maros [at] k-1.com
63 http://www.k-1.com
64  
65 =head1 LICENSE
66  
67 This program is free software; you can redistribute it and/or modify it under
68 the same terms as Perl itself.
69  
70 =cut
71  
72 1 1;
73  
74 __DATA__
« CatalystX/I18N/TraitFor/Response.pm ↑ Summary Catalyst/Helper/Model/Maketext.pm »