=cut
-my $msg = sub {
- "Indirect call of method \"$_[1]\" on object \"$_[0]\" at $_[2] line $_[3].\n"
-};
-
sub unimport {
shift;
if ($arg eq 'hook') {
$hook = shift;
} elsif ($arg eq ':fatal') {
- $hook = sub { die $msg->(@_) };
+ $hook = sub { die msg(@_) };
}
last if $hook;
}
- $hook = sub { warn $msg->(@_) } unless defined $hook;
+ $hook = sub { warn msg(@_) } unless defined $hook;
$^H |= 0x00020000;
$^H{+(__PACKAGE__)} = _tag($hook);
();
}
+=head1 FUNCTIONS
+
+=head2 C<msg $object, $method, $file, $line>
+
+Returns the default error message generated by C<indirect> when an invalid construct is reported.
+
+=cut
+
+sub msg {
+ "Indirect call of method \"$_[1]\" on object \"$_[0]\" at $_[2] line $_[3].\n"
+};
+
=head1 CONSTANTS
=head2 C<I_THREADSAFE>