|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
  
 
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-  | 
| 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # vim: ts=4 sts=4 sw=4:  | 
| 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package CPAN::URL;  | 
| 
4
 | 
12
 | 
 
 | 
 
 | 
  
12
  
 | 
 
 | 
50
 | 
 use overload '""' => "as_string", fallback => 1;  | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
16
 | 
    | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
55
 | 
    | 
| 
5
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # accessors: TEXT(the url string), FROM(DEF=>defaultlist,USER=>urllist),  | 
| 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # planned are things like age or quality  | 
| 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
8
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1451
 | 
 use vars qw(  | 
| 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             $VERSION  | 
| 
10
 | 
12
 | 
 
 | 
 
 | 
  
12
  
 | 
 
 | 
734
 | 
 );  | 
| 
 
 | 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
14
 | 
    | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $VERSION = "5.5";  | 
| 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub new {  | 
| 
14
 | 
27
 | 
 
 | 
 
 | 
  
27
  
 | 
  
0
  
 | 
87
 | 
     my($class,%args) = @_;  | 
| 
15
 | 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
159
 | 
     bless {  | 
| 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
            %args  | 
| 
17
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
           }, $class;  | 
| 
18
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
19
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub as_string {  | 
| 
20
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
6
 | 
     my($self) = @_;  | 
| 
21
 | 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
12
 | 
     $self->text;  | 
| 
22
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub text {  | 
| 
24
 | 
6
 | 
 
 | 
 
 | 
  
6
  
 | 
  
0
  
 | 
9
 | 
     my($self,$set) = @_;  | 
| 
25
 | 
6
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
11
 | 
     if (defined $set) {  | 
| 
26
 | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
         $self->{TEXT} = $set;  | 
| 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
28
 | 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
28
 | 
     $self->{TEXT};  | 
| 
29
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
31
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;  |