| 1 | # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- | ||||||||||||||
| 2 | # vim: ts=4 sts=4 sw=4: | ||||||||||||||
| 3 | package CPAN::URL; | ||||||||||||||
| 4 | 26 | ▶ | use overload '""' => "as_string", fallback => 1; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | # accessors: TEXT(the url string), FROM(DEF=>defaultlist,USER=>urllist), | ||||||||||||||
| 6 | # planned are things like age or quality | ||||||||||||||
| 7 | |||||||||||||||
| 8 | 26 | ▶ | use vars qw( | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 9 | $VERSION | ||||||||||||||
| 10 | 26 | ); | |||||||||||||
| 11 | 26 | $VERSION = "5.5"; | |||||||||||||
| 12 | |||||||||||||||
| 13 | 93 | ▶ | sub new { | ||||||||||||
|
Subroutine
new: called CC=1 SCAR=1.2
Pod
undocumented
| |||||||||||||||
| 14 | 0 | ▶ | my($class,%args) = @_; | ||||||||||||
|
Subroutine
new: not called CC=1 SCAR=1.2
Pod
undocumented
| |||||||||||||||
| 15 | 0 | bless { | |||||||||||||
| 16 | %args | ||||||||||||||
| 17 | }, $class; | ||||||||||||||
| 18 | } | ||||||||||||||
| 19 | 103 | ▶ | sub as_string { | ||||||||||||
|
Subroutine
as_string: called CC=1 SCAR=1.2
Pod
undocumented
| |||||||||||||||
| 20 | 0 | ▶ | my($self) = @_; | ||||||||||||
|
Subroutine
as_string: not called CC=1 SCAR=1.2
Pod
undocumented
| |||||||||||||||
| 21 | 0 | $self->text; | |||||||||||||
| 22 | } | ||||||||||||||
| 23 | 103 | ▶ | sub text { | ||||||||||||
|
Subroutine
text: called CC=2 SCAR=11.6
Pod
undocumented
| |||||||||||||||
| 24 | 0 | ▶ | my($self,$set) = @_; | ||||||||||||
|
Subroutine
text: not called CC=2 SCAR=11.6
Pod
undocumented
| |||||||||||||||
| 25 | 0 | ▶ | if (defined $set) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 26 | 0 | $self->{TEXT} = $set; | |||||||||||||
| 27 | } | ||||||||||||||
| 28 | 0 | $self->{TEXT}; | |||||||||||||
| 29 | } | ||||||||||||||
| 30 | |||||||||||||||
| 31 | 26 | 1; | |||||||||||||