So even without any ResourcePools in our vSphere Client UI, there are some default resource pool entities.
You can get it from your virtual machine object with the property 'resourcePool'. That's most likely what the PowerCLI cmdlet is doing, just using the same resource pool the template is current in (template and virtual machines are the same object, it's just a boolean flag).
So, from Perl, assuming you got the resourcePool property from your get_view or find_entity_view calls:
$pool_moref = $vm->{'resourcePool'};
$pool = Vim::get_view(mo_ref => $pool_moref);
# ...