File Coverage

blib/lib/Mojolicious/Plugin/Obrazi.pm
Criterion Covered Total %
statement 13 14 92.8
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 17 19 89.4


line stmt bran cond sub pod time code
1             package Mojolicious::Plugin::Obrazi;
2 1     1   1483 use Mojo::Base 'Mojolicious::Plugin', -signatures;
  1         3  
  1         7  
3 1     1   346 use feature ':5.26';
  1         3  
  1         273  
4              
5             our $VERSION = '0.15';
6              
7             my sub _obrazi {
8 0     0   0 return 'Helper obrazi(…) is not implemented yet…';
9             }
10              
11 1     1 1 45 sub register ($self, $app, $config) {
  1         2  
  1         3  
  1         2  
  1         2  
12 1         8 $app->helper(obrazi => \&_obrazi);
13 1         153 return $self;
14             }
15              
16             1;
17              
18             =encoding utf8
19              
20             =head1 NAME
21              
22             Mojolicious::Plugin::Obrazi - A static gallery generator (and renderer) for any site.
23              
24             =head1 SYNOPSIS
25              
26             # Mojolicious
27             $self->plugin('Obrazi');
28              
29             # Mojolicious::Lite
30             plugin 'Obrazi';
31              
32            
33             <%= obrazi(csv_file => 'path/to/obrazi.csv') %>
34              
35             =head1 DESCRIPTION
36              
37             L is a L plugin that consists of a
38             command — L, which resizes a
39             set of images and generates html for a gallery and, a not yet wirtten
40             L which produces HTML from a CSV file found in a directory,
41             containing images. While the command is functional already, the plugin is
42             empty. This is a yet early release. Todo: write the helper.
43              
44             =head1 METHODS
45              
46             L inherits all methods from
47             L and implements the following new ones.
48              
49             =head2 register
50              
51             $plugin->register(Mojolicious->new);
52              
53             Register plugin in L application.
54              
55             =head1 HELPERS
56              
57             =head2 obrazi
58              
59            
60             <%= obrazi(csv_file => 'path/to/obrazi.csv') %>
61              
62             Renders a gallery section in the current page. Not implemented yet.
63              
64             =head1 NOTES
65              
66             This plugin requires Perl 5.26+ and Mojolicious 9.17+.
67              
68             =head1 COPYRIGHT
69              
70             This is free software, licensed under:
71              
72             The Artistic License 2.0 (GPL Compatible)
73              
74             The full text of the license can be found in the
75             LICENSE file included with this module.
76              
77             =head1 SEE ALSO
78              
79             L,
80             L, L, L,
81             L.
82              
83             =cut