You are here: Foswiki>Tasks Web>Item8634 (24 Oct 2010, WillNorris)Edit Attach

Item8634: StringifierContrib to skip attachments that it doesn't have the prerequisites to parse

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: StringifierContrib
Branches:
Reported By: WillNorris
Waiting For: Main.WillNorris
Last Change By: WillNorris
from Item8289:

Anyway, the XLSX.pm shouldn't:
  1. use base, that's bad practice, and is probably documented somewhere
  2. use SomeOptionalModule - instead, it should try to load them, and disable the XLSX parsing upon failure (maybe with a warning in debug mode)
  3. not be in DOS mode smile

But yeah, you're right, I should just have not asked to index XLSX anyway.

But even if I comment .xslx from the config, it still tries to load the .pm, so it doesn't help.

Did a quick & dirty fix for now, like:
BEGIN {
    eval { require Spreadsheet::XLSX; };
    return 0 if $@; # Disabled until somebody fixes this loading
}
#use Spreadsheet::XLSX;

-- OlivierRaginel - 25 Sep 2009

i'm going to go with this:
+  try {
+      require Spreadsheet::XLSX;
+  } catch Error with {
+      return '';
+  }

same idea applied to HTML (for CPAN:HTML::TreeBuilder). everything else is an external program (rather than a CPAN dependency) and already don't cause things to fail to compile, so they don't need any updating.

-- WillNorris - 24 Oct 2010

this fix may deal with the issue on Item9311

-- WillNorris - 24 Oct 2010
 

ItemTemplate edit

Summary StringifierContrib to skip attachments that it doesn't have the prerequisites to parse
ReportedBy WillNorris
Codebase
SVN Range
AppliesTo Extension
Component StringifierContrib
Priority Enhancement
CurrentState Closed
WaitingFor WillNorris
Checkins StringifierContrib:8eb2cef8e117
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 24 Oct 2010, WillNorris
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy