[Rt-commit] rt branch, 4.2/html-gumbo-loading, created. rt-4.2.5-115-g04bbe3d

Wallace Reis wreis at bestpractical.com
Wed Jul 2 14:22:10 EDT 2014


The branch, 4.2/html-gumbo-loading has been created
        at  04bbe3dc04e7df98e04ebe6ab05cec2b06b95d45 (commit)

- Log -----------------------------------------------------------------
commit 04bbe3dc04e7df98e04ebe6ab05cec2b06b95d45
Author: Wallace Reis <wreis at bestpractical.com>
Date:   Wed Jul 2 15:19:50 2014 -0300

    Use UNIVERSAL::require for loading HTML::Gumbo
    
    ... for consistency, like we already do in some other places instead of
    using an eval. This is a residual change from 4.2/html-gumbo-balancing.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 6b87aa8..818f9c4 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -72,6 +72,7 @@ use Encode qw();
 use List::MoreUtils qw();
 use JSON qw();
 use Plack::Util;
+use UNIVERSAL::require;
 
 =head2 SquishedCSS $style
 
@@ -3971,7 +3972,7 @@ sub _NewScrubber {
     require HTML::Scrubber;
     my $scrubber = HTML::Scrubber->new();
 
-    if (eval "require HTML::Gumbo; 1") {
+    if (HTML::Gumbo->require) {
         no warnings 'redefine';
         my $orig = \&HTML::Scrubber::scrub;
         *HTML::Scrubber::scrub = sub {

-----------------------------------------------------------------------


More information about the rt-commit mailing list