| 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::Storable_TEST; | ||
| 6 | 1 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | $Class::Scaffold::Storable_TEST::VERSION = '1.102280'; | |
| 8 | } | ||
| 9 | # ABSTRACT: Companion test class for the storable base class | ||
| 10 | 1 | ▶ | use Error::Hierarchy::Test 'throws2_ok'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use Test::More; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | ▶ | use parent 'Class::Scaffold::Test'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | use constant PLAN => 1; | ||
| 14 | |||
| 15 | sub run { | ||
| 16 | my $self = shift; | ||
| 17 | $self->SUPER::run(@_); | ||
| 18 | $self->make_real_object; | ||
| 19 | throws2_ok { | ||
| 20 | Class::Scaffold::Storable_TEST::x001->new->storage->prepare('foo'); | ||
| 21 | } | ||
| 22 | 'Error::Hierarchy::Internal::CustomMessage', | ||
| 23 | qr/can't find method to get storage object from delegate/, | ||
| 24 | 'using non-existing storage'; | ||
| 25 | } | ||
| 26 | |||
| 27 | package Class::Scaffold::Storable_TEST::x001; | ||
| 28 | BEGIN { | ||
| 29 | $Class::Scaffold::Storable_TEST::x001::VERSION = '1.102280'; | ||
| 30 | } | ||
| 31 | use parent 'Class::Scaffold::Storable'; | ||
| 32 | 1; | ||
| 33 | |||
| 34 | __END__ | ||