If I create the Win32::Perms object with a Win32::Registry object, and try to set permission on a 'registry:...' path, it eats memory. If I try to Set on a Win32::Registry object, then nothing happens.
If I try to create a Win32::Perms object with a 'registry:..' path, then the Dump doesn't have the ACL permissions for groups and users.
Here is the code:
#!/usr/bin/perl
use strict;
use warnings;
use Win32::Registry;
use Win32::Perms;
my $path = 'SOFTWARE\\Classes';
my $key1 = 'opendocument.WriterDocument.1';
my $key2 = 'opendocument.WriterGlobalDocument.1';
$::HKEY_LOCAL_MACHINE->Open("$path\\$key1", my $doc1) or die "Acck: $^E";
#This doesn't work (nothing in Dump)
#my $p = Win32::Perms->new("HKEY_LOCAL_MACHINE\\$path\\$key1");
my $p = Win32::Perms->new($doc1);
$p->Dump;
print "Set\n";
$p->SetDacl("registry:HKEY_LOCAL_MACHINE\\$path\\$key2", 1) or die "Acck: $^E";
print "Set!\n";
$p->Close;
$doc1->Close;
#$doc2->Close;