use DocumentInfo; ... sub getDocumentInfo { my $file_id = shift; # suspect problem here return DocumentInfo::new($file_id); }