[Koha-bugs] [Bug 6877] New: test for Libravatar::URL can cause scripts to abort

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Sep 17 13:43:10 CEST 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6877

             Bug #: 6877
           Summary: test for Libravatar::URL can cause scripts to abort
    Classification: Unclassified
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: OPAC
        AssignedTo: oleonard at myacpl.org
        ReportedBy: colin.campbell at ptfs-europe.com
         QAContact: koha-bugs at lists.koha-community.org


Scripts attempt to do a runtime conditional import of the Libravatar::URL but
uses 'use' rather than require/import so that this is done at compile time and
the script will abort on compile and not process the code before the eval. 

Change the code to use require that is executed at runtime and an eval block
rather than a string eval.

Personally using eval for this is a bit of a code smell. Checking the existence
of the module on every run seems inefficient.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list