Netscape::HistoryURL - URI::URL subclass with Netscape history information
$url = new Netscape::HistoryURL('http://foobar.com/', LAST, FIRST, COUNT, EXPIRE, TITLE);
The history database is used to keep track of all URLs you have visited. This is used to color previously visited URLs different, for example. The information stored in the history database depends on the version of Netscape being used.
$object = new Netscape::HistoryURL( URL, LAST, FIRST, COUNT, EXPIRE, TITLE );
This creates a new instance of the Netscape::HistoryURL object class. This supports all the methods supported by the URI::URL class. Please see the documentation for that module.
The first argument passed is a string which contains a valid URL. The remaining arguments are information (usually) extracted from Netscape's history database.
LAST is the time the URL was last visited, and FIRST is the time when the URL was first visited. COUNT is the number of times you have visited the URL. We're not really sure what EXPIRE is yet. TITLE is the title of the referenced page.
You will normally not use the constructor yourself;
it is usually invoked by the
The Netscape::HistoryURL class supports all methods of the URI::URL class, and additional methods as described below. Please see the documentation for URI::URL for details of the other methods supported.
$time = $url->visit_time();
This routine is provided for backwards compatibility with the previous
versions of this module. You should use
$time = $url->first_visit_time();
This method returns the time you first visited the URL, in seconds since the last epoch. This can then be used with any of the standard routines for formatting as a string. The following example uses ctime(), from the Date::Format module:
print "Time of last visit for $url : ", ctime($url->first_visit_time);
$time = $url->last_visit_time();
This method returns the time you last (most recently) visited the URL, in seconds since the last epoch.
$title = $url->title();
This method returns the title of the referenced page, if one
was available. The value will be
$count = $url->visit_count();
This method returns the number of times you have visited the page.
$expire = $url->expire();
This method returns the expire values which is stored for the URL. We don't know what this is for yet, or the right way to interpret it.
Copyright (c) 1997-2000 Canon Research Centre Europe. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.