Mercurial > pub > Impl
view Lib/IMPL/Resources.pm @ 359:833e663796c4
TTView: added view variable to pass rendering context between controls
TTView: display function renamed to display_for
WebResource: resources now marked with roles for searching a desired resource by a role in the resource chain
author | sergey |
---|---|
date | Mon, 25 Nov 2013 02:19:31 +0400 |
parents | d485467eca92 |
children | 39842eedd923 |
line wrap: on
line source
package IMPL::Resources; use strict; our $CurrentLocale ||= 'default'; sub currentLocale { $CurrentLocale; } sub SetLocale { my ($self,$locale) = @_; $CurrentLocale = $locale; } sub InvokeInLocale { my ($this,$locale,$code) = @_; local $CurrentLocale = $locale; eval { &$code() if $code; }; die $@ if $@; } 1;