package IIa66da94aed9b371a0ee16b72f938ea09::tag_currency; use strict; use base qw/II720d6e18aa34327713eb014408fc9144/; sub start { my ($this, $tag, $attr, $attrseq, $origtext) = @_; my ($obj, $field, $curr, $rate) = ("#{$attr->{obj}}", $attr->{field}, $attr->{curr}, $attr->{rate}); $this->evaluate for $obj, $curr, $rate; $this->evaluate(1) for $field; my $currency_scope = II720d6e18aa34327713eb014408fc9144::IIllIllIIlIIIlll($IIb39071a48a82a07eeb9256f406abebc5::IlllIIlIllllIIIl{$II8dae0e141ee45f5daba6a74e4a7c3b6f::IIIIlIIlIIIIIIIl},81,$IIb39071a48a82a07eeb9256f406abebc5::IlllIIlIllllIIIl{$II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIlllllIllIIlIl}); $this->addCode("{"); $this->{Indent}++; $this->addCode("require $currency_scope;"); $this->addCode("my \$v = $field ? ((ref($obj) ne 'HASH' && $obj->can('getDecorated')) ? $obj->getDecorated : $obj)->{$field} : $obj;"); $this->addCode("\$this->out($curr ? $currency_scope\->formatAmount(\$v * $rate, $curr) : $currency_scope\->formatAmount(\$v));"); $this->{Indent}--; $this->addCode("}"); return; } 1; 