| 1 | package Catalyst::Helper::Firebug; | ||||||||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 1 | ▶ | use MIME::Base64; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 1 | ▶ | use File::Spec; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | =head1 NAME | ||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | Catalyst::Helper::Firebug - Catalyst Helper to generate Firebug Lite files | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | =head1 SYNOPSIS | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | ./script/myapp_create.pl Firebug [path] | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | path: output directory path (default: root/js/firebug) | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | =head1 DESCRIPTION | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | Catalyst Helper to generate Firebug Lite files | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | =head1 SEE ALSO | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | Firebug, http://getfirebug.com/ | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | Firebug Lite, http://getfirebug.com/lite.html | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | =head1 METHODS | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | =head2 mk_stuff | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | Create Firebug Lite files | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | =cut | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | 0 | ▶ | sub mk_stuff { | ||||||||||||||||||
|
Subroutine
mk_stuff: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||
| 37 | 0 | my ($self, $helper, $path) = @_; | |||||||||||||||||||
| 38 | 0 | ▶ | $path ||= File::Spec->catfile(qw/root js firebug/); | ||||||||||||||||||
|
Condition0%0/3
$path ||= "File::Spec"->catfile("root", "js", "firebug")
MC/DC0%0/2
$path ||= "File::Spec"->catfile("root", "js", "firebug")
$path
"File::Spec"->catfile("root", "js", "firebug")
Truth table0%0/3
A ||= B
A= $pathB= "File::Spec"->catfile("root", "js", "firebug")
| |||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 0 | $helper->mk_dir( File::Spec->catfile( $helper->{base}, $path ) ); | |||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 0 | my @files = qw/errorIcon.png firebug.css firebug.html firebug.js firebugx.js infoIcon.png warningIcon.png/; | |||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 0 | for my $file (@files) { | |||||||||||||||||||
| 45 | 0 | my $data = $helper->get_file(__PACKAGE__, $file); | |||||||||||||||||||
| 46 | 0 | ▶ | $data = decode_base64($data) if $file =~ /\.png$/; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 47 | 0 | $helper->mk_file( File::Spec->catfile( $helper->{base}, $path, $file ), $data ); | |||||||||||||||||||
| 48 | } | ||||||||||||||||||||
| 49 | } | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | =head1 AUTHOR | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | Daisuke Murase <typester@cpan.org> | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | =head1 COPYRIGHT | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | This program is free software; you can redistribute | ||||||||||||||||||||
| 58 | it and/or modify it under the same terms as Perl itself. | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | The full text of the license can be found in the | ||||||||||||||||||||
| 61 | LICENSE file included with this module. | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | =cut | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | 1 | 1; | |||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | __DATA__ | ||||||||||||||||||||