package IIa66da94aed9b371a0ee16b72f938ea09::tag_config; use strict; use base qw/II720d6e18aa34327713eb014408fc9144/; sub start { my ($this, $tag, $attr, $attrseq, $origtext) = @_; my ($var, $config, $section) = ("#{$attr->{var}}", $attr->{config}, $attr->{section}); $this->evaluate for $var; $this->evaluate(1) for $config, $section; my $classHandler = "Zen::PerlHandler"; my $classConfig = "Zen::Config"; if ($attr->{config}) { $this->addCode("$var = $classHandler\->get('$classConfig\->get')->do($config);"); } elsif ($attr->{section}) { $this->addCode("my (\$cfg, \$sec) = $section =~ /^([\\w\\:]+)::(\\w+)\$/;"); $this->addCode("die('invalid section syntax: ' . $section) unless \$cfg && \$sec;"); $this->addCode("$var = $classHandler\->get('$classConfig\->get')->do(\$cfg)->{\$sec};"); } else { $this->harakiri("need config or section"); } return; } 1; 