I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-04-15 12:20:04.459129-07 by jmgdoc in response to 12638
Re: How Does One Determine the Type of an OODoc?

There are at least two ways, depending on the related object and the current situation.

If we got an ODF container (through the odfContainer constructor, representing the physical file), we can retrieve the mimetype using the extract method. For example, assuming that $filename represents the path of a text (odt) document, the following code should return "application/vnd.oasis.opendocument.text", that is the full mime type of an ODF text document (the last part of the mimetype string changes according to the ODF document type):
my $container = odfContainer($filename); my $mimetype = $container->extract("mimetype");

If we start from a document content object (initialized through odfDocument), we have the contentClass() method that returns "text", "spreadsheet", etc, according to the document class (caution: that works with the "content" part only, not with other parts such as "styles", "settings" or "meta"):
my $doc = odfDocument(file => $filename, part => "content"); my $doc_type = $doc->contentClass;
Direct Responses: Write a response