line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Rose::HTML::Anchor; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
104463
|
use strict; |
|
2
|
|
|
|
|
21
|
|
|
2
|
|
|
|
|
69
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
12
|
use base 'Rose::HTML::Object'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
946
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.606'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
__PACKAGE__->add_valid_html_attrs |
10
|
|
|
|
|
|
|
( |
11
|
|
|
|
|
|
|
'charset', # %Charset; #IMPLIED -- char encoding of linked resource |
12
|
|
|
|
|
|
|
'type', # %ContentType; #IMPLIED -- advisory content type |
13
|
|
|
|
|
|
|
'name', # CDATA #IMPLIED -- named link end |
14
|
|
|
|
|
|
|
'href', # %URI; #IMPLIED -- URI for linked resource |
15
|
|
|
|
|
|
|
'hreflang', # %LanguageCode; #IMPLIED -- language code |
16
|
|
|
|
|
|
|
'rel', # %LinkTypes; #IMPLIED -- forward link types |
17
|
|
|
|
|
|
|
'rev', # %LinkTypes; #IMPLIED -- reverse link types |
18
|
|
|
|
|
|
|
'accesskey', # %Character; #IMPLIED -- accessibility key character |
19
|
|
|
|
|
|
|
'shape', # %Shape; rect -- for use with client-side image maps |
20
|
|
|
|
|
|
|
'coords', # %Coords; #IMPLIED -- for use with client-side image maps |
21
|
|
|
|
|
|
|
'tabindex', # NUMBER #IMPLIED -- position in tabbing order |
22
|
|
|
|
|
|
|
'onfocus', # %Script; #IMPLIED -- the element got the focus |
23
|
|
|
|
|
|
|
'onblur', # %Script; #IMPLIED -- the element lost the focus |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
2
|
0
|
22
|
sub href { shift->html_attr('href', @_) } |
27
|
0
|
|
|
0
|
0
|
0
|
sub name { shift->html_attr('name', @_) } |
28
|
0
|
|
|
0
|
0
|
0
|
sub title { shift->html_attr('title', @_) } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
0
|
sub element { 'a' } |
31
|
8
|
|
|
8
|
1
|
100
|
sub html_element { 'a' } |
32
|
8
|
|
|
8
|
1
|
111
|
sub xhtml_element { 'a' } |
33
|
|
|
|
|
|
|
|
34
|
4
|
|
|
4
|
1
|
54
|
sub link { shift->children(@_) } |
35
|
0
|
|
|
0
|
0
|
|
sub contents { shift->children(@_) } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Rose::HTML::Anchor - Object representation of an HTML anchor. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 SYNOPSIS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
$a = Rose::HTML::Anchor->new(href => 'apple.html', link => 'Apple'); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
print $a->html; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
$a->link(Rose::HTML::Image->new(src => 'a.gif')); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
print $a->html; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
... |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
L<Rose::HTML::Anchor> is an object representation of an HTML anchor, or "a" tag. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This class inherits from, and follows the conventions of, L<Rose::HTML::Object>. Inherited methods that are not overridden will not be documented a second time here. See the L<Rose::HTML::Object> documentation for more information. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 HTML ATTRIBUTES |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Valid attributes: |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
accesskey |
68
|
|
|
|
|
|
|
charset |
69
|
|
|
|
|
|
|
class |
70
|
|
|
|
|
|
|
coords |
71
|
|
|
|
|
|
|
dir |
72
|
|
|
|
|
|
|
href |
73
|
|
|
|
|
|
|
hreflang |
74
|
|
|
|
|
|
|
id |
75
|
|
|
|
|
|
|
lang |
76
|
|
|
|
|
|
|
name |
77
|
|
|
|
|
|
|
onblur |
78
|
|
|
|
|
|
|
onclick |
79
|
|
|
|
|
|
|
ondblclick |
80
|
|
|
|
|
|
|
onfocus |
81
|
|
|
|
|
|
|
onkeydown |
82
|
|
|
|
|
|
|
onkeypress |
83
|
|
|
|
|
|
|
onkeyup |
84
|
|
|
|
|
|
|
onmousedown |
85
|
|
|
|
|
|
|
onmousemove |
86
|
|
|
|
|
|
|
onmouseout |
87
|
|
|
|
|
|
|
onmouseover |
88
|
|
|
|
|
|
|
onmouseup |
89
|
|
|
|
|
|
|
rel |
90
|
|
|
|
|
|
|
rev |
91
|
|
|
|
|
|
|
shape |
92
|
|
|
|
|
|
|
style |
93
|
|
|
|
|
|
|
tabindex |
94
|
|
|
|
|
|
|
title |
95
|
|
|
|
|
|
|
type |
96
|
|
|
|
|
|
|
xml:lang |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=over 4 |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item B<new PARAMS> |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Constructs a new L<Rose::HTML::Anchor> object based on PARAMS, where PARAMS are name/value pairs. Any object method is a valid parameter name. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=back |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 OBJECT METHODS |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=over 4 |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item B<link [ARGS]> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
This is an alias for the L<children|Rose::HTML::Object/children> method. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=back |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 AUTHOR |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
John C. Siracusa (siracusa@gmail.com) |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 LICENSE |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |