Bump minor version number
[pspp-builds.git] / perl-module / lib / PSPP.pm
index a000b0115adbbd60a066787cdb6fec2f7cd19c6a..4eb8c41dd6f7fe36a3b8ec1ce9fe3ff522d9003d 100644 (file)
@@ -21,7 +21,7 @@ None by default.
 
 =cut
 BEGIN {
-       do 'pspp-vers.pl' || die "No version set";
+       $PSPP::VERSION='0.7.1';
        require XSLoader;
        XSLoader::load('PSPP', $PSPP::VERSION);
 }
@@ -106,6 +106,28 @@ sub get_var
     return $var;
 }
 
+=pod
+
+=head3 get_var_by_name ($name)
+
+Returns the variable from the dictionary whose name is C<name>.
+If there is no such variable, a null reference will be returned.
+
+=cut
+
+sub get_var_by_name
+{
+    my $dict = shift;
+    my $name = shift;
+    my $var = pxs_get_var_by_name ($dict, $name);
+
+    if ( ref $var ) 
+    {
+       bless ($var, "PSPP::Var");
+    }
+    return $var;
+}
+
 
 package PSPP::Fmt;
 
@@ -333,6 +355,12 @@ sub set_value_labels
 Sets the missing values for the variable.  
 No more than three missing values may be specified.
 
+=head3 get_attributes()
+
+Returns a reference to a hash of the custom variable attributes.
+Each value of the hash is a reference to an array containing the 
+attribute values.
+
 =head3 get_name ()
 
 Returns the name of the variable.
@@ -435,7 +463,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 <C>filename.
+data and dictionary information from C<filename>.
 
 =cut
 
@@ -461,7 +489,7 @@ 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 <C>get_next_case after <C>open has been called retrieves
+The first call to C<get_next_case> after C<open> 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.
 
@@ -497,7 +525,7 @@ John Darrington, E<lt>john@darrington.wattle.id.auE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2007, 2008 by Free Software Foundation
+Copyright (C) 2007, 2008, 2009 by Free Software Foundation
 
 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