cvs commit: p5ee/App-Context/lib/App/Serializer OneLine.pm

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     05/08/09 12:09:33

  Modified:    App-Context/lib/App/Serializer OneLine.pm
  Log:
  support undef values
  
  Revision  Changes    Path
  1.2       +5 -2      p5ee/App-Context/lib/App/Serializer/OneLine.pm
  
  Index: OneLine.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Context/lib/App/Serializer/OneLine.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OneLine.pm	27 Feb 2004 16:17:21 -0000	1.1
  +++ OneLine.pm	9 Aug 2005 19:09:33 -0000	1.2
  @@ -72,7 +72,10 @@
               $perl .= $evensep if ($nelem);
           }
           $elem = $data[$nelem];
  -        if (ref($elem) eq "") {
  +        if (! defined $elem) {
  +            $perl .= "undef";
  +        }
  +        elsif (ref($elem) eq "") {
               $perl .= $elem;
           }
           elsif (ref($elem) eq "ARRAY") {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.