| 1 | package Data::HashMap::Shared::SS; | ||
| 2 | 63 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 63 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 63 | ▶ | use Data::HashMap::Shared; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 63 | our $VERSION = '0.23'; | |
| 6 | |||
| 7 | 63 | my @KEYWORDS = qw( | |
| 8 | put get remove exists size keys values items each iter_reset clear | ||
| 9 | to_hash max_entries get_or_set put_ttl max_size ttl cursor | ||
| 10 | cursor_next cursor_seek ttl_remaining capacity tombstones | ||
| 11 | cursor_reset take pop shift drain flush_expired | ||
| 12 | flush_expired_partial mmap_size touch reserve stat_evictions | ||
| 13 | stat_expired stat_recoveries arena_used arena_cap add add_ttl | ||
| 14 | update_ttl update swap cas cas_take persist set_ttl | ||
| 15 | ); | ||
| 16 | |||
| 17 | 49 | ▶ | sub import { |
|
Subroutine
import: called CC=2 SCAR=6.9
| |||
| 18 | 49 | $^H{__PACKAGE__ . "/shm_ss_$_"} = 1 for @KEYWORDS; | |
| 19 | } | ||
| 20 | |||
| 21 | 1 | ▶ | sub unimport { |
|
Subroutine
unimport: called CC=2 SCAR=6.9
| |||
| 22 | 1 | my $prefix = __PACKAGE__ . '/'; | |
| 23 | 1 | delete $^H{$_} for grep { index($_, $prefix) == 0 } CORE::keys(%^H); | |
| 24 | } | ||
| 25 | |||
| 26 | 63 | 1; | |
| 27 | |||
| 28 | __END__ | ||