X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=perl-module%2Flib%2FPSPP.pm;h=b84c311e21db8526e595208884925b62515149b9;hb=e440df47523ce3c7189a3db3e19e742dd434291a;hp=2ca942c208d4771c0616016b76c435018692b82d;hpb=39e6db3000d93d76a8036ca319147096fe24d097;p=pspp-builds.git diff --git a/perl-module/lib/PSPP.pm b/perl-module/lib/PSPP.pm index 2ca942c2..b84c311e 100644 --- a/perl-module/lib/PSPP.pm +++ b/perl-module/lib/PSPP.pm @@ -21,7 +21,7 @@ None by default. =cut BEGIN { - do 'pspp-vers.pl' || die "No version set"; + $PSPP::VERSION='0.7.2'; require XSLoader; XSLoader::load('PSPP', $PSPP::VERSION); } @@ -87,9 +87,15 @@ sub new =pod +=head3 get_var_cnt () + +Returns the number of variables in the dictionary. + =head3 get_var ($idx) Returns the Cth variable from the dictionary. +Returns undef if C is greater than or equal to the number +of variables in the dictionary. =cut @@ -243,7 +249,7 @@ An integer denoting the number of decimal places for the format. =item width -An integer denoting the number of width of the format. +An integer denoting the width of the format. =back @@ -463,7 +469,7 @@ 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 filename. +data and dictionary information from C. =cut @@ -489,9 +495,10 @@ Returns the dictionary associated with the reader. Retrieves the next case from the reader. This method returns an array of scalars, each of which are the values of the data in the system file. -The first call to get_next_case after open has been called retrieves +The first call to C after C has been called retrieves the first case in the system file. Each subsequent call retrieves the next -case. If there are no more cases to be read, the function returns undef. +case. If there are no more cases to be read, the function returns an empty +list. If the case contains system missing values, these values are set to the empty string. @@ -503,7 +510,7 @@ values retrieved from a reader. =head3 PSPP::format_value ($value, $variable) -Returns a scalar containing a string representing C formatted accoring +Returns a scalar containing a string representing C formatted according to the print format of C. In the most common ussage, C should be a value of C.