| 1 | package Script::Singleton; | ||||||||||
| 2 | |||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 5 | ▶ | use Cwd qw(abs_path); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 5 | ▶ | use IPC::Shareable; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 5 | our $VERSION = '0.03'; | |||||||||
| 10 | |||||||||||
| 11 | 5 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=2 SCAR=6.9
| |||||||||||
| 12 | 5 | my ($class, %params) = @_; | |||||||||
| 13 | |||||||||||
| 14 | 5 | ▶ | $params{glue} = abs_path((caller())[1]) if ! exists $params{glue}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | |||||||||||
| 16 | 5 | IPC::Shareable->singleton($params{glue}, $params{warn}); | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub __placeholder {} | ||||||||
|
Subroutine
__placeholder: not called CC=1 SCAR=0.0
| |||||||||||
| 20 | |||||||||||
| 21 | 5 | 1; | |||||||||
| 22 | __END__ | ||||||||||