| 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 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | ▶ | use vars qw(@ISA); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 1 | require Tie::Hash; | |
| 17 | |||
| 18 | 1 | @ISA = qw(Tie::StdHash); | |
| 19 | |||
| 20 | 0 | ▶ | sub STORE { $_[0]->{lc $_[1]} = $_[2] } |
|
Subroutine
STORE: not called CC=1 SCAR=6.9
| |||
| 21 | 0 | ▶ | sub FETCH { $_[0]->{lc $_[1]} } |
|
Subroutine
FETCH: not called CC=1 SCAR=6.9
| |||
| 22 | 0 | ▶ | sub EXISTS { exists $_[0]->{lc $_[1]} } |
|
Subroutine
EXISTS: not called CC=1 SCAR=6.9
| |||
| 23 | 0 | ▶ | sub DELETE { delete $_[0]->{lc $_[1]} } |
|
Subroutine
DELETE: not called CC=1 SCAR=6.9
| |||
| 24 | |||
| 25 | 1 | 1; | |