File: Object.pm

package info (click to toggle)
libmonkey-patch-perl 0.03-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 148 kB
  • sloc: perl: 175; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package Monkey::Patch::Handle::Object;
BEGIN {
  $Monkey::Patch::Handle::Object::VERSION = '0.03';
}
use strict;
use warnings;

use base 'Monkey::Patch::Handle::Class';

sub should_call_code {
    my ($self, $invocant) = @_;
    no warnings 'numeric';
    return $self->{object} == $invocant;
}

1;

=head1 NAME

Monkey::Patch::Handle::Object - Handle for monkey-patching objects

=head1 DESCRIPTION

Monkey::Patch::Handle::Object provides the default Monkey::Patch::Handle
for monkey-patching a particular object.

You should never need to use this directly, so read L(Monkey::Patch)
instead.

=pod

=begin Pod::Coverage

.*

=end Pod::Coverage