ARSperl

 view release on metacpan or  search on metacpan

html/manual/ars_EncodeDiary.html  view on Meta::CPAN

<HTML>
<HEAD>
<TITLE>ARSperl Manual - ars_EncodeDiary</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">

   <H2><CODE>ars_EncodeDiary(diaryEntryHash1, ... diaryEntryHashN)</CODE></H2>

	Encode a list of <A HREF="ds_diaryentry_hash.html">diaryEntryHash</A>'s
	into a single scalar (internal ARS diary field representation).

      <DL>
         <DT><B>On success</B><DD>
		Returns the encoded scalar.
         <DT><B>On failure</B><DD>
                Returns undef.
      </DL>

      <P>Example:

      <PRE>
	$a-&gt;{timestamp} = time();
	$a-&gt;{user} = "foobar";
	$a-&gt;{value} = "diary entry 1";

	$b-&gt;{timestamp} = time();
	$b-&gt;{user} = "raboof";
	$b-&gt;{value} = "diary entry 2";

	($encodedDiary = ars_EncodeDiary($a, $b)) ||
		die "ars_EncodeDiary failed";
      </PRE>

	<B>Note</B>: this routine is really only useful when using
	<A HREF="ars_MergeEntry.html">ars_MergeEntry</A>. This routine
	is a <I>helper</I> routine and does not alter
	<CODE>$ars_errstr</CODE> if an error occurs. There is no
	<CODE>ars_DecodeDiary</CODE> routine. 
	<P>

<I>ars_EncodeDiary was introduced in version 1.46 of ARSperl</I>

<P>
<HR WIDTH="30%">
<P>
<A HREF="toc.html"><IMG ALT="&lt;--" SRC="arrow.gif" ALIGN=CENTER> Table of Contents </A>
<p>
<address>
Last changes to this page 21st July 1997 by jcmurphy@arsperl.org<BR>
&#169; J.C.Murphy, J.W.Murphy 1997 arsperl@arsperl.org
</address>
</BODY>
</HTML>



( run in 0.710 second using v1.01-cache-2.11-cpan-140bd7fdf52 )