2 use strict; use warnings;
5 # This file should be loaded by apache on startup (add to a "startup.pl" file)
9 $OpenILS::WWW::Redirect::lib_ips_hash = {};
10 my $hash = $OpenILS::WWW::Redirect::lib_ips_hash;
13 while( my $data = <F> ) {
17 my( $reglib, $ip1, $ip2 ) = split(/\t/, $data);
18 next unless ($reglib and $ip1 and $ip2);
20 my( $reg, $lib ) = split(/-/,$reglib);
21 next unless ($reg and $lib);
23 # print "$reg : $lib : $ip1 : $ip2\n";
25 $hash->{$reg} = {} unless exists $hash->{$reg};
26 $hash->{$reg}->{$lib} = [] unless exists $hash->{$reg}->{$lib};
28 push( @{$hash->{$reg}->{$lib}}, [ $ip1, $ip2 ] );