| 1 | package Test::Mockify::MethodSpy; | ||
| 2 | |||
| 3 | 18 | ▶ | use parent 'Test::Mockify::Method'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 18 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 18 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | #--------------------------------------------------------------------- | ||
| 8 | 27 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 9 | 27 | my $class = shift; | |
| 10 | 27 | my ($OriginalMethodPointer) = @_; | |
| 11 | 27 | my $self = $class->SUPER::new(); | |
| 12 | 27 | $self->{'OriginalMethodPointer'} = $OriginalMethodPointer; | |
| 13 | 27 | return $self; | |
| 14 | } | ||
| 15 | #--------------------------------------------------------------------- | ||
| 16 | 27 | ▶ | sub _addToTypeStore { ## no critic (Private subroutine/method) used in chaining |
|
Subroutine
_addToTypeStore: called CC=1 SCAR=0.0
| |||
| 17 | 27 | my $self = shift; | |
| 18 | 27 | my ($Signature, $NewExpectedParameters) = @_; | |
| 19 | 27 | my $SignatureKey = join('',@{$Signature}); | |
| 20 | 27 | my $Parameter = Test::Mockify::Parameter->new($NewExpectedParameters); | |
| 21 | 27 | $Parameter->buildReturn()->thenCall($self->{'OriginalMethodPointer'}); | |
| 22 | 27 | push(@{$self->{'TypeStore'}{$SignatureKey}}, $Parameter ); | |
| 23 | 27 | return; | |
| 24 | } | ||
| 25 | 18 | 1; | |