line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::MobileJp::Plugin::EZweb::Object; |
2
|
6
|
|
|
6
|
|
36
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
247
|
|
3
|
6
|
|
|
6
|
|
34
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
214
|
|
4
|
6
|
|
|
6
|
|
31
|
use base 'Exporter'; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
663
|
|
5
|
6
|
|
|
6
|
|
33
|
use Params::Validate; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
444
|
|
6
|
6
|
|
|
6
|
|
40
|
use HTML::Entities; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
2652
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our @EXPORT = qw/ezweb_object/; |
9
|
|
|
|
|
|
|
|
10
|
10
|
|
|
10
|
|
467
|
sub _escape { encode_entities( $_[0], q{<>&"'} ) } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _param { |
13
|
3
|
|
|
3
|
|
8
|
sprintf q{}, |
14
|
|
|
|
|
|
|
_escape( $_[0] ), _escape( $_[1] ); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub ezweb_object { |
18
|
1
|
|
|
1
|
0
|
85
|
validate( |
19
|
|
|
|
|
|
|
@_, |
20
|
|
|
|
|
|
|
+{ |
21
|
|
|
|
|
|
|
url => 1, |
22
|
|
|
|
|
|
|
mime_type => 1, |
23
|
|
|
|
|
|
|
copyright => { regex => qr{^(?:yes|no)$} }, |
24
|
|
|
|
|
|
|
standby => 0, |
25
|
|
|
|
|
|
|
disposition => { regex => qr{^dev.+$} }, |
26
|
|
|
|
|
|
|
size => { regex => qr{^[0-9]+$} }, |
27
|
|
|
|
|
|
|
title => 1, |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
); |
30
|
1
|
|
|
|
|
58
|
my %args = @_; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
3
|
my @ret; |
33
|
1
|
|
|
|
|
6
|
push @ret, sprintf( |
34
|
|
|
|
|
|
|
q{ |
35
|
|
|
|
|
|
|
_escape( $args{url} ), |
36
|
|
|
|
|
|
|
_escape( $args{mime_type} ), |
37
|
|
|
|
|
|
|
_escape( $args{copyright} ), |
38
|
|
|
|
|
|
|
_escape( $args{standby} ) |
39
|
|
|
|
|
|
|
); |
40
|
1
|
|
|
|
|
49
|
push @ret, map { _param($_, $args{$_}) } qw/disposition size title/; |
|
3
|
|
|
|
|
87
|
|
41
|
1
|
|
|
|
|
43
|
push @ret, ""; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
15
|
join("\n", @ret) . "\n"; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
__END__ |