Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[viv] Handle nested packages, packages with curlies

git-svn-id: http://svn.pugscode.org/pugs@30664 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit ef4461b098d331731f0b8963ea693146098b285f 1 parent 591fbdc
sorear authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 viv
8 viv
View
@@ -1094,6 +1094,9 @@ sub indent {
{ package VAST::package_def; our @ISA = 'VAST::Base';
sub emit_p5 { my $self = shift; my $lvl = shift;
my $def_module_name = $self->{longname}[0]{name}->Str;
+ if ($self->{decl}{inpkg}[0] =~ /GLOBAL::(.*)/) {
+ $def_module_name = "$1::$def_module_name";
+ }
my @extends;
for (@{$self->{trait}}) {
my $t = $_->Str;
@@ -1163,7 +1166,10 @@ use YAML::XS;
$SIG{__WARN__} = sub { die @_," statement started at line ", 'STD'->lineof($::LASTSTATE), "\n" } if $::DEBUG;
END
- $out .= $self->{statementlist}->emit_p5($lvl+1);
+ $out .= $self->{statementlist}->emit_p5($lvl+1)
+ if $self->{statementlist};
+ $out .= $self->{blockoid}{statementlist}->emit_p5($lvl+1)
+ if $self->{blockoid}{statementlist};
}
$out;
}
Please sign in to comment.
Something went wrong with that request. Please try again.