.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.14) .\" .\" 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" '' '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 turned on, 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. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DlfStream 3pm" .TH DlfStream 3pm "2006-07-23" "Lire 2.1.1" "LogReport's Lire 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" Lire::DlfStream \- Interface to DLF data stream .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Lire::DlfStore; \& \& my $store = Lire::DlfStore\->open( "mystore" ); \& my $dlf_stream = $store\->open_dlf_stream( "www", "r" ); \& \& print "Data begins on ", scalar localtime $dlf_stream\->start_time(), "\en"; \& print "Data ends on ", scalar localtime $dlf_stream\->end_time(), "\en"; \& while ( my $dlf = $dlf_stream\->read_dlf() ) { \& ... \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This object encapsulates \s-1DLF\s0 stream. .SS "name" .IX Subsection "name" Returns the schema's name of the DlfStream. .SS "\fImode()\fP" .IX Subsection "mode()" Returns the mode in which the DlfStream was opened. .SS "\fIsort_spec()\fP" .IX Subsection "sort_spec()" Returns the sort specification that is set on the stream. .SS "\fIclose()\fP" .IX Subsection "close()" This method should be called when the Lire::DlfStream isn't needed anymore, otherwise the same DlfStream cannot be opened until then. .SS "\fInrecords()\fP" .IX Subsection "nrecords()" Returs the number of \s-1DLF\s0 records in the stream. .SS "\fIstart_time()\fP" .IX Subsection "start_time()" Returns the timestamp of the oldest \s-1DLF\s0 record in the stream in seconds since the epoch. .SS "\fIend_time()\fP" .IX Subsection "end_time()" Returns the timestamp of the newest \s-1DLF\s0 record in the stream in seconds since the epoch. .SS "\fIread_dlf()\fP" .IX Subsection "read_dlf()" Returns an hash reference containing the next \s-1DLF\s0 record in the stream. It returns undef once the end of the stream is reached. .PP This method will throw an exception if the DlfStream isn't open in 'r' mode or if there is an error reading the \s-1DLF\s0 record. .SS "\fIread_dlf_aref()\fP" .IX Subsection "read_dlf_aref()" Returns the next \s-1DLF\s0 record in the stream as an array reference. The fields are in the order specified by the schema. .PP This method will throw an exception if the DlfStream isn't open in 'r' mode or if there is an error reading the \s-1DLF\s0 record. .ie n .SS "write_dlf( $dlf, [ $link_ids ] )" .el .SS "write_dlf( \f(CW$dlf\fP, [ \f(CW$link_ids\fP ] )" .IX Subsection "write_dlf( $dlf, [ $link_ids ] )" Writes the fields contained in the hash ref \f(CW$dlf\fR to the \s-1DLF\s0 stream. .PP This method will throw an exception if there is an error writing the \&\s-1DLF\s0 record or if the stream isn't opened in 'w' mode. .PP The \f(CW$link_ids\fR parameter is used when the stream's schema is a Lire::DerivedSchema. It should be an array reference containing the \&\s-1DLF\s0 ids of the records which are linked to this record. .ie n .SS "clean( [ $time ] )" .el .SS "clean( [ \f(CW$time\fP ] )" .IX Subsection "clean( [ $time ] )" This method will remove all \s-1DLF\s0 records older than \f(CW$time\fR. It \f(CW$time\fR is omitted, all Dlf records will be removed.