Commit c1dcf3b1 authored by Byron Jones's avatar Byron Jones

Bug 621925: Avoid 'used only once' warning when loading extensions

r=mkanat, a=mkanat
parent 90062dd4
......@@ -222,8 +222,14 @@ sub extension_package_directory {
my ($invocant, $file) = @_;
my $class = ref($invocant) || $invocant;
# $file is set on the first invocation, store the value in the extension's
# package for retrieval on subsequent calls
my $var;
{ no strict 'refs'; $var = \${"${class}::EXTENSION_PACKAGE_DIR"}; }
{
no warnings 'once';
no strict 'refs';
$var = \${"${class}::EXTENSION_PACKAGE_DIR"};
}
if ($file) {
$$var = dirname($file);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment