CPANPLUS-YACSmoke
view release on metacpan or search on metacpan
lib/CPANPLUS/YACSmoke/ReAssemble.pm view on Meta::CPAN
$list;
}
sub _insert_node {
my $self = shift;
my $path = shift;
my $offset = shift;
my $token = shift;
my $debug = shift;
my $path_end = [@{$path}[$offset..$#{$path}]];
# NB: $path->[$offset] and $[path_end->[0] are equivalent
my $token_key = _re_path($self, [$token]);
$debug and print "# insert node(@{[_dump($token)]}:@{[_dump(\@_)]}) (key=$token_key)",
" at path=@{[_dump($path_end)]}\n";
if( ref($path_end->[0]) eq 'HASH' ) {
if( exists($path_end->[0]{$token_key}) ) {
if( @$path_end > 1 ) {
my $path_key = _re_path($self, [$path_end->[0]]);
my $new = {
$path_key => [ @$path_end ],
$token_key => [ $token, @_ ],
( run in 0.357 second using v1.01-cache-2.11-cpan-cc502c75498 )