| Summary | Package variables | Synopsis | Description | General documentation | Methods |
| Summary | Top |
| Clair::ALE::URL - A URL created by the Automatic Link Extrapolator |
| Package variables | Top |
| No package variables defined. |
| Included modules | Top |
| Carp |
| Clair::Utils::ALE |
| Synopsis | Top |
| This object simply contains a URL and an ID for a single URL. |
| Description | Top |
|
new(url => 'url', id => 'id') Create a new URL with the given URL and ID. Both of these options arerequired, and no others are currently recognized. $url->print([indent_spaces]) Print a brief, human-readable description of a URL. If theindent_spaces parameter is provided, everything will be indented by indent_spaces characters of $Clair::Utils::ALE::INDENTCHAR; this is useful for printing easy-to-read nested structures. No other guarantees about the format of the output are provided; if you need a specific format, you should just print things out yourself, or else talk to me about adding a specialized printing method. $url->{url} The absolute URL of this URL.$url->{id} A short unique identifier for this URL. |
| Methods | Top |
| new | No description | Code |
| No description | Code |
| new | description | prev | next | Top |
sub new
{
my $class = shift;
my $self = {@_};
unless ($self->{url} and $self->{id})
{
croak "Need a url and an id to create an Clair::ALE::URL!\n";
}
bless $self,$class;} |
| description | prev | next | Top |
sub print
{
my $self = shift;
my($indent_spaces) = @_;
my $indent;
if ($indent_spaces)
{
$indent = " " x $indent_spaces;
}
else
{
$indent = "";
$indent_spaces=0;
}
print $indent,"(URL)\n";
print $indent,"url: $self->{url}\n";
print $indent," id: $self->{id}\n";} |
| EXAMPLES | Top |
| Mostly, these are created from Clair::ALE::Search and other modules; there really isn't a good reason to create one yourself, but if you want to, you can do: my $url = Clair::ALE::URL->new(url => 'http://www.test.com/', |
| SEE ALSO | Top |
| Clair::Utils::ALE, Clair::ALE::Search, Clair::ALE::Link, Clair::ALE::Conn. |