File Coverage

blib/lib/Giblog/Command/new.pm
Criterion Covered Total %
statement 9 14 64.2
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 13 19 68.4


line stmt bran cond sub pod time code
1             package Giblog::Command::new;
2              
3 1     1   603 use base 'Giblog::Command';
  1         3  
  1         534  
4              
5 1     1   35 use strict;
  1         5  
  1         26  
6 1     1   6 use warnings;
  1         2  
  1         102  
7              
8             sub run {
9 0     0 1   my ($self, @argv) = @_;
10            
11 0           my $website_name = shift @argv;
12              
13 0           my $api = $self->api;
14            
15 0           my $module_name = ref $self;
16            
17 0           $api->create_website_from_proto($website_name, $module_name);
18             }
19              
20             1;
21              
22             =encoding utf8
23              
24             =head1 NAME
25              
26             Giblog::Command::new - Empty website creating command
27              
28             =head1 DESCRIPTION
29              
30             L is a command to create empty website.
31              
32             You can also create your website creating command inheriting L like L or L.
33              
34             =head1 METHODS
35              
36             L inherits all methods from L and
37             implements the following new ones.
38              
39             =head2 run
40              
41             $command->run($website_name);
42              
43             Create website with website name.
44              
45             All contents is copied from C directory.
46              
47             C directory path is "/path/Giblog/Command/new/proto", if module loaded path is "/path/Giblog/Command/new.pm".