line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dancer2::Plugin::EditFile; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
45731
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
14
|
|
5
|
1
|
|
|
1
|
|
3
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
46
|
|
6
|
1
|
|
|
1
|
|
404
|
use File::Copy "cp"; |
|
1
|
|
|
|
|
3175
|
|
|
1
|
|
|
|
|
44
|
|
7
|
1
|
|
|
1
|
|
4
|
use File::Basename; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
45
|
|
8
|
1
|
|
|
1
|
|
408
|
use Try::Tiny; |
|
1
|
|
|
|
|
955
|
|
|
1
|
|
|
|
|
47
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
411
|
use Dancer2::Core::Types qw(Bool HashRef Str); |
|
1
|
|
|
|
|
7567
|
|
|
1
|
|
|
|
|
93
|
|
11
|
1
|
|
|
1
|
|
483
|
use Dancer2::Plugin; |
|
1
|
|
|
|
|
40244
|
|
|
1
|
|
|
|
|
4
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Dancer2::Plugin::EditFile - Edit a text file from Dancer2 |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 VERSION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Version 0.005 |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our $VERSION = '0.005'; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 SYNOPSIS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
use Dancer2; |
30
|
|
|
|
|
|
|
use Dancer2::Plugin::EditFile; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 DESCRIPTION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This plugin will allow you to retrieve a text file using Dancer2 and display it in an html page. Also, it will save the edited file to it's location on the server. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
It's designed to be flexible and unobtrusive. It's behavior is customizable through Dancer's config file. ration file to activate or deactivate files that may be edited. Just include it in your Dancer2 script, set the configuration and use it. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
B |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=over 4 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
B |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
There is a sample template in the sample folder. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=back |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 CONFIGURATION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
You may specify the routes and access to files. The plugin will only read/write files if it has access to them. The following configuration will generate two routes: '/editfile/display' and '/editfile/save'. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
A sample HTML page with Bootstrap and jQuery is included in the samples directory. Use it as an example to build your own page. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
plugins: |
56
|
|
|
|
|
|
|
EditFile: |
57
|
|
|
|
|
|
|
backup: 1 |
58
|
|
|
|
|
|
|
backup_dir: '/var/application/backups' |
59
|
|
|
|
|
|
|
display: |
60
|
|
|
|
|
|
|
method: 'get' |
61
|
|
|
|
|
|
|
route: '/editfile/display' |
62
|
|
|
|
|
|
|
template: 'editfile.tt' |
63
|
|
|
|
|
|
|
layout: 'nomenu.tt' |
64
|
|
|
|
|
|
|
save: |
65
|
|
|
|
|
|
|
method: 'get' |
66
|
|
|
|
|
|
|
route: '/editfile/save' |
67
|
|
|
|
|
|
|
files: |
68
|
|
|
|
|
|
|
id1: |
69
|
|
|
|
|
|
|
heading: 'Edit Config.yml' |
70
|
|
|
|
|
|
|
file: '/var/application/config.yml' |
71
|
|
|
|
|
|
|
save: 1 |
72
|
|
|
|
|
|
|
id2: |
73
|
|
|
|
|
|
|
heading: 'View config script config2' |
74
|
|
|
|
|
|
|
file: '/var/application/config2.txt' |
75
|
|
|
|
|
|
|
save: 0 |
76
|
|
|
|
|
|
|
id3: |
77
|
|
|
|
|
|
|
heading: 'View XML file config3.xml' |
78
|
|
|
|
|
|
|
file: '/var/application/config3.xml' |
79
|
|
|
|
|
|
|
save: 0 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=over 4 |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
B the user B have read/write access to the file being edited and the backup directory. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=back |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=over 4 |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item I |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Specify if original file should be saved. Default = 0 (do not save) |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item I |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Directory where original files should be saved. Default = /tmp |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item I |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Defines display settings. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=over 4 |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item I |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Default 'get'. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item I |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Route in Dancer to display template and file contents for editing/viewing. Default '/editfile/display' |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item I |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Template cotaining edit/view form. Default 'editfile.tt' |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item I |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Layout of template. This is useful when opening a window to edit/view files. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=back |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=item I |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=over 4 |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=item I |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Default 'get'. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=item I |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=back |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=item I |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
List of predefined files that may be edited/viewed. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=over 4 |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=item I |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
A unique identifier for this file. It's used as part of the route to identify this file. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item I |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
This is a heading to be passed to the template. Use it as a short description to the file you're editing/viewing. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item I |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
The file name on the drive. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=item I |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Specifies if file may be saved. Default = 0 (view only) |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=back |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=cut |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
# |
160
|
|
|
|
|
|
|
# Accessors |
161
|
|
|
|
|
|
|
# |
162
|
|
|
|
|
|
|
has backup => ( |
163
|
|
|
|
|
|
|
is => 'ro', |
164
|
|
|
|
|
|
|
isa => Bool, |
165
|
|
|
|
|
|
|
from_config => 1, |
166
|
|
|
|
|
|
|
default => sub { 0 } |
167
|
|
|
|
|
|
|
); |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
has backup_dir => ( |
170
|
|
|
|
|
|
|
is => 'ro', |
171
|
|
|
|
|
|
|
isa => Str, |
172
|
|
|
|
|
|
|
from_config => 1, |
173
|
|
|
|
|
|
|
default => sub { '/tmp' } |
174
|
|
|
|
|
|
|
); |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
has display_method => ( |
177
|
|
|
|
|
|
|
is => 'ro', |
178
|
|
|
|
|
|
|
isa => Str, |
179
|
|
|
|
|
|
|
from_config => 'display.method', |
180
|
|
|
|
|
|
|
default => sub { 'get' } |
181
|
|
|
|
|
|
|
); |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
has display_route => ( |
184
|
|
|
|
|
|
|
is => 'ro', |
185
|
|
|
|
|
|
|
isa => Str, |
186
|
|
|
|
|
|
|
from_config => 'display.route', |
187
|
|
|
|
|
|
|
default => sub { '/editfile/display' }, |
188
|
|
|
|
|
|
|
); |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
has display_template => ( |
191
|
|
|
|
|
|
|
is => 'ro', |
192
|
|
|
|
|
|
|
isa => Str, |
193
|
|
|
|
|
|
|
from_config => 'display.template', |
194
|
|
|
|
|
|
|
default => sub { 'editfile.tt' }, |
195
|
|
|
|
|
|
|
); |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
has display_layout => ( |
198
|
|
|
|
|
|
|
is => 'ro', |
199
|
|
|
|
|
|
|
isa => Str, |
200
|
|
|
|
|
|
|
from_config => 'display.layout', |
201
|
|
|
|
|
|
|
default => sub { '' }, |
202
|
|
|
|
|
|
|
); |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
has save_method => ( |
205
|
|
|
|
|
|
|
is => 'ro', |
206
|
|
|
|
|
|
|
isa => Str, |
207
|
|
|
|
|
|
|
from_config => 'save.method', |
208
|
|
|
|
|
|
|
default => sub { 'get' } |
209
|
|
|
|
|
|
|
); |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
has save_route => ( |
212
|
|
|
|
|
|
|
is => 'ro', |
213
|
|
|
|
|
|
|
isa => Str, |
214
|
|
|
|
|
|
|
from_config => 'save.route', |
215
|
|
|
|
|
|
|
default => sub { '/editfile/save' } |
216
|
|
|
|
|
|
|
); |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
has files => ( |
219
|
|
|
|
|
|
|
is => 'ro', |
220
|
|
|
|
|
|
|
isa => HashRef, |
221
|
|
|
|
|
|
|
from_config => 1, |
222
|
|
|
|
|
|
|
default => sub { {} }, # Empty |
223
|
|
|
|
|
|
|
); |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
# Generate routes based on configuration settings |
226
|
|
|
|
|
|
|
sub BUILD { |
227
|
0
|
|
|
0
|
0
|
|
my $plugin = shift; |
228
|
0
|
|
|
|
|
|
my $app = $plugin->app; |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
# Setup route to display a template for the edit/view |
231
|
0
|
|
|
|
|
|
my $disp_method = $plugin->display_method; |
232
|
0
|
|
|
|
|
|
my $disp_route = $plugin->display_route; |
233
|
|
|
|
|
|
|
|
234
|
0
|
|
|
|
|
|
$plugin->app->add_route( |
235
|
|
|
|
|
|
|
method => $disp_method, |
236
|
|
|
|
|
|
|
regexp => qr!$disp_route!, |
237
|
|
|
|
|
|
|
code => \&display_editfile, |
238
|
|
|
|
|
|
|
); |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
# Setup a route to return json data of the file |
241
|
0
|
|
|
|
|
|
my $save_route = $plugin->save_route; |
242
|
0
|
|
|
|
|
|
my $save_method = $plugin->save_method; |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
# Use regexp to match part of the file, then splat inside code |
245
|
0
|
|
|
|
|
|
$plugin->app->add_route( |
246
|
|
|
|
|
|
|
method => $save_method, |
247
|
|
|
|
|
|
|
regexp => qr!^$save_route!, |
248
|
|
|
|
|
|
|
code => \&save_editfile, |
249
|
|
|
|
|
|
|
); |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
} ### BUILD |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
# Function to display template |
254
|
|
|
|
|
|
|
sub display_editfile { |
255
|
0
|
|
|
0
|
0
|
|
my $app = shift; |
256
|
0
|
|
|
|
|
|
my $plugin = $app->with_plugin('EditFile'); |
257
|
|
|
|
|
|
|
|
258
|
0
|
|
|
|
|
|
my $file_id = $app->request->params->{id}; |
259
|
0
|
|
|
|
|
|
my $files = $plugin->files; |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
croak "The specified id: $file_id is not properly defined in your configuration." |
262
|
|
|
|
|
|
|
if ( ! $files->{$file_id}->{file} |
263
|
0
|
0
|
0
|
|
|
|
|| ! -f $files->{$file_id}->{file} ); |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
# |
266
|
|
|
|
|
|
|
# Expecting reasonably sized text files to edit. Like configuration files. |
267
|
|
|
|
|
|
|
# |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
# Slurp file |
270
|
0
|
|
|
|
|
|
local $/; |
271
|
0
|
|
|
|
|
|
open ( my $EDITFILE_IN, "<", $files->{$file_id}->{file} ) ; |
272
|
0
|
|
|
|
|
|
my $editfile = <$EDITFILE_IN>; |
273
|
0
|
|
|
|
|
|
close($EDITFILE_IN); |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
$app->template($plugin->display_template, |
276
|
|
|
|
|
|
|
{ id => $file_id, |
277
|
|
|
|
|
|
|
title => $files->{$file_id}->{heading}, |
278
|
|
|
|
|
|
|
editfile => $editfile, |
279
|
|
|
|
|
|
|
save_route => $plugin->save_route, |
280
|
|
|
|
|
|
|
save_method => $plugin->save_method, |
281
|
|
|
|
|
|
|
save => $files->{$file_id}->{save} }, |
282
|
0
|
|
|
|
|
|
{ layout => $plugin->display_layout }) ; |
283
|
|
|
|
|
|
|
} |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
sub save_editfile { |
287
|
0
|
|
|
0
|
0
|
|
my $app = shift; |
288
|
0
|
|
|
|
|
|
my $plugin = $app->with_plugin('EditFile'); |
289
|
|
|
|
|
|
|
|
290
|
0
|
|
|
|
|
|
my $status_message = ""; |
291
|
|
|
|
|
|
|
|
292
|
0
|
|
|
|
|
|
my $file_id = $app->request->params->{id}; |
293
|
0
|
|
|
|
|
|
my $editedfile = $app->request->params->{editfile}; |
294
|
0
|
|
|
|
|
|
my $files = $plugin->files; |
295
|
|
|
|
|
|
|
|
296
|
0
|
0
|
0
|
|
|
|
if ( ! $files->{$file_id}->{file} ) { |
|
|
0
|
|
|
|
|
|
297
|
0
|
|
|
|
|
|
$status_message = "The specified id: $file_id is not properly defined in your configuration."; |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
} elsif ( $plugin->{backup} && $plugin->{backup_dir} ) { |
300
|
0
|
0
|
|
|
|
|
if ( -d $plugin->{backup_dir} ) { |
301
|
|
|
|
|
|
|
|
302
|
0
|
|
|
|
|
|
my $basename = basename( $files->{$file_id}->{file} ); |
303
|
|
|
|
|
|
|
my $backup_filename = $plugin->{backup_dir} |
304
|
0
|
|
|
|
|
|
. '/' |
305
|
|
|
|
|
|
|
. $basename |
306
|
|
|
|
|
|
|
. '.' |
307
|
|
|
|
|
|
|
. time; |
308
|
|
|
|
|
|
|
|
309
|
0
|
|
|
|
|
|
eval { |
310
|
0
|
|
|
|
|
|
copy($basename, $backup_filename); |
311
|
|
|
|
|
|
|
}; |
312
|
0
|
0
|
|
|
|
|
if ( $@ ) { |
313
|
0
|
|
|
|
|
|
$status_message = "Could not save backup"; |
314
|
|
|
|
|
|
|
} |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
} |
317
|
|
|
|
|
|
|
} |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
# Write it if there are no errors |
320
|
0
|
0
|
|
|
|
|
if ( $status_message eq '' ) { |
321
|
0
|
|
|
|
|
|
eval { |
322
|
0
|
|
|
|
|
|
open ( my $EDITFILE_OUT, ">", $files->{$file_id}->{file} ) ; |
323
|
0
|
|
|
|
|
|
print $EDITFILE_OUT $editedfile; |
324
|
0
|
|
|
|
|
|
close($EDITFILE_OUT); |
325
|
|
|
|
|
|
|
}; |
326
|
0
|
0
|
|
|
|
|
if ( $@ ) { |
327
|
0
|
|
|
|
|
|
$status_message = "Could not write changes to file."; |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
} |
330
|
|
|
|
|
|
|
|
331
|
0
|
|
|
|
|
|
$app->send_as( JSON => { save_message => $status_message } ); |
332
|
|
|
|
|
|
|
} |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
=back |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
=head1 AUTHOR |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
Hagop "Jack" Bilemjian, C<< >> |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
=head1 BUGS |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
344
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
345
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
=head1 SUPPORT |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
perldoc Dancer2::Plugin::EditFile |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
You can also look for information at: |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
=over 4 |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
L |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
L |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
=item * CPAN Ratings |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
L |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
=item * Search CPAN |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
L |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
=back |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
Copyright 2015-2017 Hagop "Jack" Bilemjian. |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
387
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
388
|
|
|
|
|
|
|
copy of the full license at: |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
L |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
Any use, modification, and distribution of the Standard or Modified |
393
|
|
|
|
|
|
|
Versions is governed by this Artistic License. By using, modifying or |
394
|
|
|
|
|
|
|
distributing the Package, you accept this license. Do not use, modify, |
395
|
|
|
|
|
|
|
or distribute the Package, if you do not accept this license. |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
If your Modified Version has been derived from a Modified Version made |
398
|
|
|
|
|
|
|
by someone other than you, you are nevertheless required to ensure that |
399
|
|
|
|
|
|
|
your Modified Version complies with the requirements of this license. |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
This license does not grant you the right to use any trademark, service |
402
|
|
|
|
|
|
|
mark, tradename, or logo of the Copyright Holder. |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
This license includes the non-exclusive, worldwide, free-of-charge |
405
|
|
|
|
|
|
|
patent license to make, have made, use, offer to sell, sell, import and |
406
|
|
|
|
|
|
|
otherwise transfer the Package with respect to any patent claims |
407
|
|
|
|
|
|
|
licensable by the Copyright Holder that are necessarily infringed by the |
408
|
|
|
|
|
|
|
Package. If you institute patent litigation (including a cross-claim or |
409
|
|
|
|
|
|
|
counterclaim) against any party alleging that the Package constitutes |
410
|
|
|
|
|
|
|
direct or contributory patent infringement, then this Artistic License |
411
|
|
|
|
|
|
|
to you shall terminate on the date that such litigation is filed. |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER |
414
|
|
|
|
|
|
|
AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. |
415
|
|
|
|
|
|
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
416
|
|
|
|
|
|
|
PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY |
417
|
|
|
|
|
|
|
YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR |
418
|
|
|
|
|
|
|
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR |
419
|
|
|
|
|
|
|
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, |
420
|
|
|
|
|
|
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
=head1 SEE ALSO |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
L |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
L |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
=cut |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
1; # End of Dancer2::Plugin::EditFile |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
|