| 1 | 1 | ▶ | use 5.008; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | package Class::Scaffold::LazyString; | ||
| 6 | 1 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | $Class::Scaffold::LazyString::VERSION = '1.102280'; | |
| 8 | } | ||
| 9 | # ABSTRACT: Provides a string that is evaluated lazily | ||
| 10 | 1 | ▶ | use Exporter qw(import); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | our @EXPORT = qw(lazy_string); | |
| 12 | 0 | ▶ | sub lazy_string { bless { code => shift }, 'Class::Scaffold::LazyString::Code' } |
|
Subroutine
lazy_string: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 13 | |||
| 14 | package Class::Scaffold::LazyString::Code; | ||
| 15 | 1 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 1 | $Class::Scaffold::LazyString::Code::VERSION = '1.102280'; | |
| 17 | } | ||
| 18 | 0 | ▶ | use overload '""' => sub { $_[0]->{code}->() }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=0.2
| |||
| 19 | 1 | 1; | |
| 20 | |||
| 21 | |||
| 22 | __END__ | ||