line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: LckHash.pm,v 1.3 2000-06-02 12:53:37-04 roderick Exp $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (c) 1997-2000 Roderick Schertler. All rights reserved. |
4
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify |
5
|
|
|
|
|
|
|
# it under the same terms as Perl itself. |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Sirc::LckHash; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Lck == lower case key. Hashes tied to this package will always use |
12
|
|
|
|
|
|
|
# lower case keys. |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
5
|
use vars qw(@ISA); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
189
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
require Tie::Hash; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
@ISA = qw(Tie::StdHash); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
|
|
sub STORE { $_[0]->{lc $_[1]} = $_[2] } |
21
|
0
|
|
|
0
|
|
|
sub FETCH { $_[0]->{lc $_[1]} } |
22
|
0
|
|
|
0
|
|
|
sub EXISTS { exists $_[0]->{lc $_[1]} } |
23
|
0
|
|
|
0
|
|
|
sub DELETE { delete $_[0]->{lc $_[1]} } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |