in reply to Working with COM objects

You might try:

$tool->{Data} = $data;