]> git.donarmstrong.com Git - liborg-parser-perl.git/blob - lib/Org/Element/Link.pm
Import original source of Org-Parser 0.23
[liborg-parser-perl.git] / lib / Org / Element / Link.pm
1 package Org::Element::Link;
2
3 use 5.010;
4 use locale;
5 use Moo;
6 extends 'Org::Element';
7
8 our $VERSION = '0.23'; # VERSION
9
10 has link => (is => 'rw');
11 has description => (is => 'rw');
12 has from_radio_target => (is => 'rw');
13
14 sub as_string {
15     my ($self) = @_;
16     return $self->_str if defined $self->_str;
17     join("",
18          "[",
19          "[", $self->link, "]",
20          (defined($self->description) && length($self->description) ?
21               ("[", $self->description, "]") : ()),
22          "]");
23 }
24
25 1;
26 # ABSTRACT: Represent Org hyperlink
27
28
29 =pod
30
31 =head1 NAME
32
33 Org::Element::Link - Represent Org hyperlink
34
35 =head1 VERSION
36
37 version 0.23
38
39 =head1 DESCRIPTION
40
41 Derived from L<Org::Element>.
42
43 =head1 ATTRIBUTES
44
45 =head2 link => STR
46
47 =head2 description => STR
48
49 =head2 from_radio_target => BOOL
50
51 =head1 METHODS
52
53 =for Pod::Coverage as_string
54
55 =head1 AUTHOR
56
57 Steven Haryanto <stevenharyanto@gmail.com>
58
59 =head1 COPYRIGHT AND LICENSE
60
61 This software is copyright (c) 2012 by Steven Haryanto.
62
63 This is free software; you can redistribute it and/or modify it under
64 the same terms as the Perl 5 programming language system itself.
65
66 =cut
67
68
69 __END__
70