.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "XML::RSS::Headline 3pm" .TH XML::RSS::Headline 3pm "2023-09-14" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" XML::RSS::Headline \- Persistant XML RSS Encapsulation .SH "VERSION" .IX Header "VERSION" 2.2 .SH "SYNOPSIS" .IX Header "SYNOPSIS" Headline object to encapsulate the headline/URL combination of a \s-1RSS\s0 feed. It provides a unique id either by way of the \s-1URL\s0 or by doing an \s-1MD5\s0 checksum on the headline (when \s-1URL\s0 uniqueness fails). .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .ie n .SS "XML::RSS::Headline\->new( headline => $headline, url => $url )" .el .SS "XML::RSS::Headline\->new( headline => \f(CW$headline\fP, url => \f(CW$url\fP )" .IX Subsection "XML::RSS::Headline->new( headline => $headline, url => $url )" .ie n .SS "XML::RSS::Headline\->new( item => $item )" .el .SS "XML::RSS::Headline\->new( item => \f(CW$item\fP )" .IX Subsection "XML::RSS::Headline->new( item => $item )" A XML::RSS::Headline object can be initialized either with headline/url or with a parse \s-1XML::RSS\s0 item structure. The argument 'headline_as_id' is optional and takes a boolean as its value. .SH "METHODS" .IX Header "METHODS" .ie n .SS "$headline\->id" .el .SS "\f(CW$headline\fP\->id" .IX Subsection "$headline->id" The id is our unique identifier for a headline/url combination. Its how we can keep track of which headlines we have seen before and which ones are new. The id is either the \s-1URL\s0 or a \s-1MD5\s0 checksum generated from the headline text (if \fB\f(CB$headline\fB\->headline_as_id\fR is true); .ie n .SS "$headline\->multiline_headline" .el .SS "\f(CW$headline\fP\->multiline_headline" .IX Subsection "$headline->multiline_headline" This method returns the headline as either an array or array reference based on context. It splits headline on newline characters into the array. .ie n .SS "$headline\->item( $item )" .el .SS "\f(CW$headline\fP\->item( \f(CW$item\fP )" .IX Subsection "$headline->item( $item )" Init the object for a parsed \s-1RSS\s0 item returned by \s-1XML::RSS\s0. .ie n .SS "$headline\->set_first_seen" .el .SS "\f(CW$headline\fP\->set_first_seen" .IX Subsection "$headline->set_first_seen" .ie n .SS "$headline\->set_first_seen( \fBTime::HiRes::time()\fP )" .el .SS "\f(CW$headline\fP\->set_first_seen( \fBTime::HiRes::time()\fP )" .IX Subsection "$headline->set_first_seen( Time::HiRes::time() )" Set the time of when the headline was first seen. If you pass in a value it will be used otherwise calls \fBTime::HiRes::time()\fR. .ie n .SS "$headline\->first_seen" .el .SS "\f(CW$headline\fP\->first_seen" .IX Subsection "$headline->first_seen" The time (in epoch seconds) of when the headline was first seen. .ie n .SS "$headline\->first_seen_hires" .el .SS "\f(CW$headline\fP\->first_seen_hires" .IX Subsection "$headline->first_seen_hires" The time (in epoch seconds and milliseconds) of when the headline was first seen. .SH "GET/SET ACCESSOR METHODS" .IX Header "GET/SET ACCESSOR METHODS" .ie n .SS "$headline\->headline" .el .SS "\f(CW$headline\fP\->headline" .IX Subsection "$headline->headline" .ie n .SS "$headline\->headline( $headline )" .el .SS "\f(CW$headline\fP\->headline( \f(CW$headline\fP )" .IX Subsection "$headline->headline( $headline )" The rss headline/title. HTML::Entities::decode_entities is used when the headline is set. (not sure why \s-1XML::RSS\s0 doesn't do this) .ie n .SS "$headline\->url" .el .SS "\f(CW$headline\fP\->url" .IX Subsection "$headline->url" .ie n .SS "$headline\->url( $url )" .el .SS "\f(CW$headline\fP\->url( \f(CW$url\fP )" .IX Subsection "$headline->url( $url )" The rss link/url. \s-1URI\-\s0>canonical is called to attempt to normalize the \s-1URL\s0 .ie n .SS "$headline\->description" .el .SS "\f(CW$headline\fP\->description" .IX Subsection "$headline->description" .ie n .SS "$headline\->description( $description )" .el .SS "\f(CW$headline\fP\->description( \f(CW$description\fP )" .IX Subsection "$headline->description( $description )" The description of the \s-1RSS\s0 headline. .ie n .SS "$headline\->headline_as_id" .el .SS "\f(CW$headline\fP\->headline_as_id" .IX Subsection "$headline->headline_as_id" .ie n .SS "$headline\->headline_as_id( $bool )" .el .SS "\f(CW$headline\fP\->headline_as_id( \f(CW$bool\fP )" .IX Subsection "$headline->headline_as_id( $bool )" A bool value that determines whether the \s-1URL\s0 will be the unique identifier or the if an \s-1MD5\s0 checksum of the \s-1RSS\s0 title will be used instead. (when the \s-1URL\s0 doesn't provide absolute uniqueness or changes within the \s-1RSS\s0 feed) .PP This is used in extreme cases when URLs aren't always unique to new healines (Use Perl Journals) and when URLs change within a \s-1RSS\s0 feed (www.debianplanet.org / debianplanet.org / search.cpan.org,search.cpan.org:80) .ie n .SS "$headline\->timestamp" .el .SS "\f(CW$headline\fP\->timestamp" .IX Subsection "$headline->timestamp" .ie n .SS "$headline\->timestamp( \fBTime::HiRes::time()\fP )" .el .SS "\f(CW$headline\fP\->timestamp( \fBTime::HiRes::time()\fP )" .IX Subsection "$headline->timestamp( Time::HiRes::time() )" A high resolution timestamp that is set using \fBTime::HiRes::time()\fR when the object is created. .SH "AUTHOR" .IX Header "AUTHOR" Jeff Bisbee, \f(CW\*(C`\*(C'\fR .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to \&\f(CW\*(C`bug\-xml\-rss\-feed at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "SUPPORT" .IX Header "SUPPORT" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc XML::RSS::Headline .Ve .PP You can also look for information at: .IP "\(bu" 4 AnnoCPAN: Annotated \s-1CPAN\s0 documentation .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .IP "\(bu" 4 \&\s-1RT: CPAN\s0's request tracker .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports. Guys thanks for actually taking time to use the code and give good, honest feedback. .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2006 Jeff Bisbee, all rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" XML::RSS::Feed, XML::RSS::Headline::PerlJobs, XML::RSS::Headline::Fark, XML::RSS::Headline::UsePerlJournals, POE::Component::RSSAggregator