Nile/Plugin/Minify.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 21 CC 3 SCAR 22.5
CC
3
Cov
0%
AUTOLOAD
12.0
BEGIN
2.0
CRAP 9.5
1 # Copyright Infomation
2 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 # Author : Dr. Ahmed Amin Elsheshtawy, Ph.D.
4 # Website: https://github.com/mewsoft/Nile, http://www.mewsoft.com
5 # Email : mewsoft@cpan.org, support@mewsoft.com
6 # Copyrights (c) 2014-2015 Mewsoft Corp. All rights reserved.
7 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 package Nile::Plugin::Minify;
9  
10 our $VERSION = '0.55';
11 our $AUTHORITY = 'cpan:MEWSOFT';
12  
13 =pod
14  
15 =encoding utf8
16  
17 =head1 NAME
18  
19 Nile::Plugin::Minify - Minifier base class for the Nile framework.
20  
21 =head1 SYNOPSIS
22  
23 $app->plugin->minify->css($output_file => $file1, $file2, $url1, $url2, ...);
24 $app->plugin->minify->js($output_file => $file1, $file2, $url1, $url2, ...);
25 $app->plugin->minify->html($output_file => $file1, $file2, $url1, $url2, ...);
26 $app->plugin->minify->perl($output_file => $file1, $file2, $url1, $url2, ...);
27  
28 =head1 DESCRIPTION
29
30 Nile::Plugin::Minify - Minifier base class for the Nile framework.
31  
32 See sub modules for details
33  
34 L<Nile::Plugin::Minify::Css>
35  
36 L<Nile::Plugin::Minify::Js>
37  
38 L<Nile::Plugin::Minify::Html>
39  
40 L<Nile::Plugin::Minify::Perl>
41  
42 =cut
43  
44 use Nile::Plugin;
45 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 sub AUTOLOAD {
47
48 my ($self) = shift;
49  
50 my ($class, $plugin) = our $AUTOLOAD =~ /^(.*)::(\w+)$/;
51
52 return $self->{$plugin}->process(@_) if ($self->{$plugin});
53  
54 my $name = "Nile::Plugin::Minify::" . ucfirst($plugin);
55
56 eval "use $name";
57
58 if ($@) {
59 $self->app->abort("Plugin Error: $name. $@");
60 }
61  
62 $self->{$plugin} = $self->app->object($name, @_);
63  
64 return $self->{$plugin}->process(@_);
65 }
66 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67  
68 =pod
69  
70 =head1 Bugs
71  
72 This project is available on github at L<https://github.com/mewsoft/Nile>.
73  
74 =head1 HOMEPAGE
75  
76 Please visit the project's homepage at L<https://metacpan.org/release/Nile>.
77  
78 =head1 SOURCE
79  
80 Source repository is at L<https://github.com/mewsoft/Nile>.
81  
82 =head1 SEE ALSO
83  
84 See L<Nile> for details about the complete framework.
85  
86 =head1 AUTHOR
87  
88 Ahmed Amin Elsheshtawy, احمد امين الششتاوى <mewsoft@cpan.org>
89 Website: http://www.mewsoft.com
90  
91 =head1 COPYRIGHT AND LICENSE
92  
93 Copyright (C) 2014-2015 by Dr. Ahmed Amin Elsheshtawy احمد امين الششتاوى mewsoft@cpan.org, support@mewsoft.com,
94 L<https://github.com/mewsoft/Nile>, L<http://www.mewsoft.com>
95  
96 This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
97  
98 =cut
99  
100 1;