perl-module: Add copyright and licence notices to all files
[pspp] / perl-module / lib / PSPP.pm.in
index a99c77db275aed0c4345893be575669e5c9c0573..de4c3d961aae01fb0e8a2579e8aaca056db9867e 100644 (file)
@@ -1,3 +1,19 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2019 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 use 5.008008;
 use strict;
 use warnings;
@@ -179,12 +195,14 @@ use constant {
     MOYR =>     26, 
     WKYR =>     27, 
     DATETIME => 28, 
-    TIME =>     29, 
-    DTIME =>    30, 
-    WKDAY =>    31, 
-    MONTH =>    32, 
-    A =>        33, 
-    AHEX =>     34
+    YMDHMS =>   29, 
+    MTIME =>    30, 
+    TIME =>     31, 
+    DTIME =>    32, 
+    WKDAY =>    33, 
+    MONTH =>    34, 
+    A =>        35, 
+    AHEX =>     36
 };
 
 
@@ -402,7 +420,8 @@ package PSPP::Sysfile;
 =head3 new ($filename, $dict [,%opts])
 
 Creates a new system file from the dictionary C<dict>.  The file will
-be written to the file called C<filename>.
+be written to the file called C<filename>. The string C<filename> must 
+be encoded in UTF-8.
 C<opt>, if specified, is a hash containing optional parameters for the
 system file.  Currently, the only supported parameter is
 C<compress>. If C<compress> is non zero, then the system file written
@@ -481,7 +500,15 @@ Opens a system file for reading.
 
 Open is used to read data from an existing system file. 
 It creates and returns a PSPP::Reader object which can be used to read 
-data and dictionary information from C<filename>.
+data and dictionary information from C<filename>.  The string C<filename> 
+must be in UTF-8 encoding.
+
+=head3 get_case_cnt ()
+
+Returns the number of cases in a open system file.  Some files
+do not store the number of cases.  In these instances undef
+will be returned.  Therefore, then programmer must check that the
+returned value is not undef before using it.
 
 =cut