line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::HyperScript::HTML5; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
508
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Exporter::Lite; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
94
|
use Text::HyperScript (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
164
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $h = Text::HyperScript->can('h'); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub h { |
12
|
115
|
|
|
115
|
1
|
325
|
goto $h; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
0
|
BEGIN { |
16
|
|
|
|
|
|
|
# referenced from: https://developer.mozilla.org/en-US/docs/Web/HTML/Element |
17
|
1
|
|
|
1
|
|
11
|
our @EXPORT = qw( |
18
|
|
|
|
|
|
|
html |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
base head link_ meta style title |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
body |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
address article aside footer header |
25
|
|
|
|
|
|
|
h1 h2 h3 h4 h5 h6 main nav section |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
blockquote dd div dl dt figcaption figure |
28
|
|
|
|
|
|
|
hr li menu ol p pre ul |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
a abbr b bdi bdo br cite code data em |
31
|
|
|
|
|
|
|
i kbd mark q_ rp rt ruby s_ samp small |
32
|
|
|
|
|
|
|
span strong sub_ sup time_ u var wbr |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
area audio img map_ track video |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
embed iframe object picture portal source |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
svg math |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
canvas noscript script |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
del ins |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
caption col colgroup table tbody td tfoot |
45
|
|
|
|
|
|
|
th thead tr_ |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
button datalist fieldset form input |
48
|
|
|
|
|
|
|
label legend meter optgroup option |
49
|
|
|
|
|
|
|
output progress select_ textarea |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
details dialog summary |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
slot template |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
|
56
|
1
|
|
|
1
|
|
8
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
138
|
|
57
|
1
|
|
|
|
|
3
|
for my $func (@EXPORT) { |
58
|
112
|
|
|
|
|
184
|
my $tag = $func; |
59
|
112
|
|
|
|
|
166
|
$tag =~ s{_}{}; |
60
|
|
|
|
|
|
|
|
61
|
112
|
|
|
|
|
567
|
*{ __PACKAGE__ . "::${func}" } = sub { |
62
|
115
|
|
|
115
|
|
103976
|
unshift @_, $tag; |
63
|
115
|
|
|
|
|
381
|
goto &h; |
64
|
112
|
|
|
|
|
356
|
}; |
65
|
|
|
|
|
|
|
} |
66
|
1
|
|
|
1
|
|
9
|
use strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=encoding utf-8 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 NAME |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Text::HyperScript::HTML5 - The shorthands for html5 tags by L. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 SYNOPSIS |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
use Text::HyperScript::HTML5 qw(p); |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
print p('hi,'), "\n"; |
82
|
|
|
|
|
|
|
# => " hi, \n" |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 SUPPORTED TAGS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
html |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
base head link_ meta style title |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
body |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
address article aside footer header |
94
|
|
|
|
|
|
|
h1 h2 h3 h4 h5 h6 main nav section |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
blockquote dd div dl dt figcaption figure |
97
|
|
|
|
|
|
|
hr li menu ol p pre ul |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
a abbr b bdi bdo br cite code data em |
100
|
|
|
|
|
|
|
i kbd mark q_ rp rt ruby s_ samp small |
101
|
|
|
|
|
|
|
span strong sub_ sup time_ u var wbr |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
area audio img map_ track video |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
embed iframe object picture portal source |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
svg math |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
canvas noscript script |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
del ins |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
caption col colgroup table tbody td tfoot |
114
|
|
|
|
|
|
|
th thead tr_ |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
buttom datalist fieldset form input |
117
|
|
|
|
|
|
|
label legend meter optgroup option |
118
|
|
|
|
|
|
|
output progress select_ textarea |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
details dialog summary |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
slot template |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 GLOBAL VARIABLES |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 $Text::HyperScript::HTML5::h : CodeRef (default is \&Text::HyperScript::h) |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
This variable exists for replacing tag generator. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Default value is CodeRef of L's C subroutine. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
You could be replacing C subroutine to another ones by this variable. |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 NOTICE |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Some shorthands have C<_> suffix. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
This reason is prevent conflict to between of built-in subroutines. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 LICENSE |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Copyright (C) OKAMURA Naoki a.k.a nyarla. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
146
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head1 AUTHOR |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
OKAMURA Naoki a.k.a nyarla: Enyarla@kalaclista.comE |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=cut |