This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Be sure to find the vmsish pragma for one-liners in exit.t.
[perl5.git] / lib / CPAN / URL.pm
1 # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
2 # vim: ts=4 sts=4 sw=4:
3 package CPAN::URL;
4 use overload '""' => "as_string", fallback => 1;
5 # accessors: TEXT(the url string), FROM(DEF=>defaultlist,USER=>urllist),
6 # planned are things like age or quality
7
8 use vars qw(
9             $VERSION
10 );
11 $VERSION = "5.5";
12
13 sub new {
14     my($class,%args) = @_;
15     bless {
16            %args
17           }, $class;
18 }
19 sub as_string {
20     my($self) = @_;
21     $self->text;
22 }
23 sub text {
24     my($self,$set) = @_;
25     if (defined $set) {
26         $self->{TEXT} = $set;
27     }
28     $self->{TEXT};
29 }
30
31 1;