Document::Info v0.01 - determine file type for Office documents
use Document::Info; if ( $Info=Document::Info->new($fileName) ) {; # $Info constructed, that means something has been determined. # Fetch the currently supported properties. $type = $Info -> getType ( ); $rev = $Info -> getRevision ( ); $os = $Info -> getOS ( ); if ( $type eq $Info->cMSExcel() ) { # Do something. Note: when checking a type or an operating System # always use the string constants like cMSExcel(). } if ( !$revision ) { # revision not determined. } } else { # Document type could not be determined. }
The module tries to figure out the document type of Office files. It utilizes OLE::Storage to determine the file type of Windows-documents. The module is in a very early state.
Martin Schwartz, schwartz@cs.tu-berlin.de
file(1), lfile(1), OLE::Storage.
To install Document::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Document::Info
CPAN shell
perl -MCPAN -e shell install Document::Info
For more information on module installation, please visit the detailed CPAN module installation guide.