Koha/C4/SIP/interactive_patron_check_password.pl
Joe Atzberger (siptest 99efcf83f0 Interactive tests for SIP abstraction representation and Members.
The test for members is useful to compare against the SIP (ILS)
representation.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:45:30 -05:00

26 lines
553 B
Perl
Executable file

#!/usr/bin/perl
#
use warnings;
use strict;
use ILS::Patron;
use Sip qw(sipbool);
use Data::Dumper;
while (1) {
print "Enter patron barcode: ";
my $in = <>;
defined($in) or last;
chomp($in);
last unless $in;
my $patron = ILS::Patron->new($in);
print Dumper($patron);
$patron or next;
print "Enter patron password: ";
$in = <>;
chomp($in);
print "Raw password is: " . $patron->{password}, "\n";
print " check_password: " . $patron->check_password($in), "\n";
print " sipbool: " . sipbool($patron->check_password($in)), "\n";
}