}
try { ... }; # warns
- no indirect ':fatal';
+ no indirect ':fatal'; # or 'FATAL', or ':Fatal' ...
if (defied $foo) { ... } # croaks, note the typo
# From the command-line
=head1 METHODS
-=head2 C<< unimport [ hook => $hook | ':fatal' ] >>
+=head2 C<< unimport [ hook => $hook | ':fatal', 'FATAL', ... ] >>
Magically called when C<no indirect @opts> is encountered.
Turns the module on.
=item *
-If it's the string C<':fatal'>, the compilation will croak on the first indirect syntax met.
+If it is a string that matches C</^:?fatal$/i>, the compilation will croak on the first indirect syntax met.
=item *
my $arg = shift;
if ($arg eq 'hook') {
$hook = shift;
- } elsif ($arg eq ':fatal') {
+ } elsif ($arg =~ /^:?fatal$/i) {
$hook = sub { die msg(@_) };
}
last if $hook;