Mercurial > pub > Impl
view Lib/IMPL/Resources.pm @ 398:38cb0b80e88e
minor changes
author | sergey |
---|---|
date | Thu, 08 May 2014 03:53:17 +0400 |
parents | 2eed076cb944 |
children |
line wrap: on
line source
package IMPL::Resources; use strict; our $CurrentLocale ||= 'default'; sub currentLocale { $CurrentLocale; } sub SetLocale { my ($self,$locale) = @_; $locale =~ tr/\-/_/; $CurrentLocale = $locale; } sub InvokeInLocale { my ($this,$locale,$code) = @_; local $CurrentLocale; $this->SetLocale($locale); &$code() if $code; } 1;