From 357840bf2908a9172a31d4aebf63dc6c04b13d3e Mon Sep 17 00:00:00 2001
From: Dominic Hargreaves <dom@earth.li>
Date: Wed, 6 May 2015 22:29:35 +0000
Subject: Load RT::Generated directly from @INC

This allows for the possibility of overriding RT::Generated in test
scenarios.

Patch-Name: load_rt_generated.diff
---
 lib/RT.pm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/RT.pm b/lib/RT.pm
index 4f3a3ebf..6993407f 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -878,10 +878,8 @@ sub InstallMode {
 
 sub LoadGeneratedData {
     my $class = shift;
-    my $pm_path = ( File::Spec->splitpath( $INC{'RT.pm'} ) )[1];
-    $pm_path = File::Spec->rel2abs( $pm_path );
 
-    require "$pm_path/RT/Generated.pm" || die "Couldn't load RT::Generated: $@";
+    require RT::Generated || die "Couldn't load RT::Generated: $@";
     $class->CanonicalizeGeneratedPaths();
 }
 
