package Loc; use parent "Locale::Maketext"; use Locale::Maketext::Lexicon { "en" => [ Gettext => \*main::DATA ] }; sub fallback_languages { }; package main; use Data::Dump qw( pp ); use strict; { # The effect of local will be reversed outside of this block local *I18N::LangTags::panic_languages = sub {}; print ( Loc->get_handle("nl") ? pp(Loc->get_handle("nl")) : "OK: got undef" ); } # end of local, so limited side effects print "\n"; __DATA__ msgid "greet" msgstr "hello %1"