« blib/lib/BalanceOfPower/Commands/RebelMilitarySupport.pm
↑ Summary
lib/BalanceOfPower/Commands/LowerDisorder.pm »
| 1 | package BalanceOfPower::Printer; | ||||||||||
| 2 | 11 | $BalanceOfPower::Printer::VERSION = '0.300010'; | |||||||||
| 3 | 11 | ▶ | use Template; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 11 | ▶ | use Cwd 'abs_path'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | sub print | ||||||||||
| 7 | { | ||||||||||
| 8 | 0 | ▶ | my $mode = shift; | ||||||||
|
Subroutine
print: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 9 | 0 | my $world = shift; | |||||||||
| 10 | 0 | my $template = shift; | |||||||||
| 11 | 0 | my $vars = shift; | |||||||||
| 12 | |||||||||||
| 13 | 0 | my $module_file_path = __FILE__; | |||||||||
| 14 | 0 | my $root_path = abs_path($module_file_path); | |||||||||
| 15 | 0 | $root_path =~ s/Printer\.pm//; | |||||||||
| 16 | 0 | $root_path .= "templates"; | |||||||||
| 17 | |||||||||||
| 18 | 0 | my $tt = Template->new({INCLUDE_PATH => "$root_path/$mode", | |||||||||
| 19 | PLUGIN_BASE => 'Template::Plugin::Filter'}); | ||||||||||
| 20 | |||||||||||
| 21 | 0 | ▶ | if(ref $world eq 'BalanceOfPower::World') | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | { | ||||||||||
| 23 | 0 | my %nation_codes = reverse %{$world->nation_codes}; | |||||||||
| 24 | 0 | $vars->{'nation_codes'} = \%nation_codes; | |||||||||
| 25 | } | ||||||||||
| 26 | 0 | my $output; | |||||||||
| 27 | 0 | ▶ | $tt->process("$template.tt", $vars, \$output) || die $tt->error . "\n"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 0 | return $output; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 11 | 1; | |||||||||
| 32 | |||||||||||