Just replace the package main stuff with:
package main;
my $file = shift;
if (defined $file) {
$file = DumpQuicktime->new(-file=>$file);
die $file->lastErr () if length $file->lastErr ();
print $file->dump ();
}
For me the tree stuff is invaluable. Quicktime atoms are nested about 30 deep in stuff I'm looking at and the output is, I'd guess, a couple of thousand lines long!
Returning a string rather than outputting directly to sdtout allows post processing of the output.
DWIM is Perl's answer to Gödel