Subject: | $block->get report block but $block->block() failed |
Considering this config file:
<Host virgo>
Moptions bind
<MountPoint /home/root>
rfs /home/root
</Mountpoint>
<Chroot /mnt/chroots/community-plf>
</Chroot>
</Host>
And this code:
$cfg = $cfg = Config::ApacheFormat->new();
$host = $cfg->block(Host => 'virgo');
$chroot = $host->(Chroot => '/mnt/chroots/community-plf');
my ($mp) = $chroot->get('MountPoint'); # Report mountpoint => /home/root
my $mpbl = $chroot->block($mp); # DIE !! block not found
In fact in this case only $host->($mp); will works, as only its contains the block.
If ->get report it, ->block on the same block object should works too, according the inheritance setting.
But it is maybe safer to not report block contains in parent block.
At all, the current behaviour is not logical according the documentation.