|
Lines 43-50
juv2adult.pl - convert juvenile/child patrons from juvenile patron category and
Link Here
|
| 43 |
juv2adult.pl [ -branch=<branchcode> -fromcat=<categorycode> -tocat=<categorycode> ] |
43 |
juv2adult.pl [ -branch=<branchcode> -fromcat=<categorycode> -tocat=<categorycode> ] |
| 44 |
|
44 |
|
| 45 |
Options: |
45 |
Options: |
| 46 |
-help brief help message |
46 |
--help brief help message |
| 47 |
-man full documentation |
47 |
--man full documentation |
| 48 |
-v verbose mode |
48 |
-v verbose mode |
| 49 |
-n take no action, display only |
49 |
-n take no action, display only |
| 50 |
-branch <branchname> only deal with patrons from this library/branch |
50 |
-branch <branchname> only deal with patrons from this library/branch |
|
Lines 54-64
juv2adult.pl [ -branch=<branchcode> -fromcat=<categorycode> -tocat=<categorycode
Link Here
|
| 54 |
|
54 |
|
| 55 |
=over 8 |
55 |
=over 8 |
| 56 |
|
56 |
|
| 57 |
=item B<-help> |
57 |
=item B<--help> |
| 58 |
|
58 |
|
| 59 |
Print a brief help message and exits. |
59 |
Print a brief help message and exits. |
| 60 |
|
60 |
|
| 61 |
=item B<-man> |
61 |
=item B<--man> |
| 62 |
|
62 |
|
| 63 |
Prints the manual page and exits. |
63 |
Prints the manual page and exits. |
| 64 |
|
64 |
|
|
Lines 140-145
my $sth=$dbh->prepare( $query );
Link Here
|
| 140 |
$sth->execute( $fromcat ) |
140 |
$sth->execute( $fromcat ) |
| 141 |
or die "Couldn't execute statement: " . $sth->errstr; |
141 |
or die "Couldn't execute statement: " . $sth->errstr; |
| 142 |
my $agelimit = $sth->fetchrow_array(); |
142 |
my $agelimit = $sth->fetchrow_array(); |
|
|
143 |
if ( not $agelimit ) { |
| 144 |
|
| 145 |
die "No patron category with that category code. Please try again. \n"; |
| 146 |
} |
| 143 |
$sth->finish( ); |
147 |
$sth->finish( ); |
| 144 |
$year -=$agelimit; |
148 |
$year -=$agelimit; |
| 145 |
|
149 |
|
|
Lines 222-229
if ( not $noaction) {
Link Here
|
| 222 |
$birthday = $res[3]; |
226 |
$birthday = $res[3]; |
| 223 |
print "$firstname $surname $barcode $birthday\n"; |
227 |
print "$firstname $surname $barcode $birthday\n"; |
| 224 |
} |
228 |
} |
| 225 |
} |
229 |
} |
| 226 |
$sth->finish( ); |
230 |
$sth->finish( ); |
| 227 |
} |
231 |
} |
| 228 |
|
|
|
| 229 |
$dbh->disconnect(); |
232 |
$dbh->disconnect(); |
| 230 |
- |
|
|