diff -c clearsilver-0.7.2/perl/Changes clearsilver-0.7.2-patch/perl/Changes *** clearsilver-0.7.2/perl/Changes Thu Oct 17 20:53:21 2002 --- clearsilver-0.7.2-patch/perl/Changes Sat Dec 14 04:56:04 2002 *************** *** 1,5 **** --- 1,10 ---- Revision history for Perl extension ClearSilver. + 0.03 Sat Dec 13 + - Added setSymlink(), writeFile(), and writeFileAtomic(). + - Set version number in Clearsilver.pm + - Write a little documentation in ClearSilver.pm + 0.02 Mon Sep 2 - Added sortObj() method to HDF class. - Filled in README. diff -c clearsilver-0.7.2/perl/ClearSilver.pm clearsilver-0.7.2-patch/perl/ClearSilver.pm *** clearsilver-0.7.2/perl/ClearSilver.pm Thu Oct 17 20:53:21 2002 --- clearsilver-0.7.2-patch/perl/ClearSilver.pm Sat Dec 14 05:00:27 2002 *************** *** 25,31 **** our @EXPORT = qw( ); ! our $VERSION = '0.01'; bootstrap ClearSilver $VERSION; --- 25,31 ---- our @EXPORT = qw( ); ! our $VERSION = '0.03'; bootstrap ClearSilver $VERSION; *************** *** 37,56 **** =head1 NAME ! ClearSilver - Perl extension for blah blah blah =head1 SYNOPSIS use ClearSilver; - blah blah blah ! =head1 DESCRIPTION ! Stub documentation for ClearSilver, created by h2xs. It looks like the ! author of the extension was negligent enough to leave the stub ! unedited. ! Blah blah blah. =head2 EXPORT --- 37,59 ---- =head1 NAME ! ClearSilver - Perl extension for ClearSilver =head1 SYNOPSIS use ClearSilver; ! $hdf = ClearSilver::HDF->new(); ! $hdf->readFile("test.hdf"); ! $hdf->setValue("Location.1", "Tokyo"); ! $cs = ClearSilver::CS->new($hdf); ! $cs->parseFile("test.cs"); ! print $cs->render(); ! ! =head1 DESCRIPTION ! ClearSilver.pm provides an interface module to ClearSilver. =head2 EXPORT *************** *** 59,65 **** =head1 AUTHOR ! A. U. Thor, Ea.u.thor@a.galaxy.far.far.awayE =head1 SEE ALSO --- 62,68 ---- =head1 AUTHOR ! Gaku Ueda gaku-cs@gaku.net =head1 SEE ALSO Only in clearsilver-0.7.2-patch/perl: ClearSilver.pm~ diff -c clearsilver-0.7.2/perl/ClearSilver.xs clearsilver-0.7.2-patch/perl/ClearSilver.xs *** clearsilver-0.7.2/perl/ClearSilver.xs Thu Oct 17 20:53:21 2002 --- clearsilver-0.7.2-patch/perl/ClearSilver.xs Sat Dec 14 04:35:19 2002 *************** *** 152,157 **** --- 152,172 ---- RETVAL int + perlhdf_setSymlink(hdf, src, dest) + ClearSilver::HDF hdf + char* src + char* dest + CODE: + hdf->err = hdf_set_symlink(hdf->hdf, src, dest); + if (hdf->err == STATUS_OK) { + RETVAL = 1; + } else { + RETVAL = 0; + } + OUTPUT: + RETVAL + + int perlhdf_readFile(hdf, filename) ClearSilver::HDF hdf char* filename *************** *** 165,170 **** --- 180,214 ---- OUTPUT: RETVAL + int + perlhdf_writeFile(hdf, fullpath) + ClearSilver::HDF hdf + char* fullpath + CODE: + hdf->err = hdf_write_file(hdf->hdf, fullpath); + if (hdf->err == STATUS_OK) { + RETVAL = 1; + } else { + RETVAL = 0; + } + OUTPUT: + RETVAL + + int + perlhdf_writeFileAtomic(hdf, fullpath) + ClearSilver::HDF hdf + char* fullpath + CODE: + hdf->err = hdf_write_file_atomic(hdf->hdf, fullpath); + if (hdf->err == STATUS_OK) { + RETVAL = 1; + } else { + RETVAL = 0; + } + OUTPUT: + RETVAL + + ClearSilver::HDF perlhdf_getObj(hdf, name) ClearSilver::HDF hdf; Only in clearsilver-0.7.2/perl: Makefile.old diff -c clearsilver-0.7.2/perl/test.hdf clearsilver-0.7.2-patch/perl/test.hdf *** clearsilver-0.7.2/perl/test.hdf Thu Oct 17 20:53:21 2002 --- clearsilver-0.7.2-patch/perl/test.hdf Sat Dec 14 04:43:56 2002 *************** *** 12,14 **** --- 12,15 ---- entry3 = 3 } + Link.Dest.sub = 2 diff -c clearsilver-0.7.2/perl/test.pl clearsilver-0.7.2-patch/perl/test.pl *** clearsilver-0.7.2/perl/test.pl Thu Oct 17 20:53:21 2002 --- clearsilver-0.7.2-patch/perl/test.pl Sat Dec 14 04:47:57 2002 *************** *** 109,114 **** --- 109,137 ---- ($name eq "entry3") ? result($testnum, 1) : result($testnum, 0); $testnum++; + # + # test setSymlink() + # + $hdf->setSymlink("Link.Src", "Link.Dest"); + $str = $hdf->getValue("Link.Src.sub", "default"); + ($str eq "2") ? result($testnum, 1) : result($testnum, 0); + $testnum++; + + # + # test writeFile() + # + $output_file = "testoutput.hdf"; + $ret = $hdf->writeFile($output_file); + unlink($output_file); + $ret ? result($testnum, 1) : result($testnum, 0); + + # + # test writeFile() + # + $output_file = "testoutput.hdf"; + $ret = $hdf->writeFileAtomic($output_file); + unlink($output_file); + $ret ? result($testnum, 1) : result($testnum, 0); # # test CS