File: add-missing-rt-base-require.diff

package info (click to toggle)
request-tracker5 5.0.9%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 82,492 kB
  • sloc: javascript: 191,917; perl: 88,537; sh: 1,434; makefile: 489; python: 37; php: 15
file content (1064 lines) | stat: -rw-r--r-- 30,645 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
From 3a0becad64f1357b81cb82c4a8d6f105899cb122 Mon Sep 17 00:00:00 2001
From: sunnavy <sunnavy@bestpractical.com>
Date: Fri, 20 Mar 2026 23:58:06 +1300
Subject: Require RT::Base before _ImportOverlays in non-inheriting modules

Modules that don't inherit from RT::Base (directly or via use base/parent)
need an explicit require RT::Base before calling RT::Base->_ImportOverlays(),
since the inheritance mechanism won't have loaded it automatically.

Origin: https://github.com/bestpractical/rt/commit/b2626998f6574c1b30e4df104ce2fea47fb6af58
Applied-Upstream: 5.0.10
Patch-Name: add-missing-rt-base-require.diff
Last-Updated: 2026-03-20
---
 lib/RT/Approval.pm                                   | 1 +
 lib/RT/Authen/ExternalAuth.pm                        | 1 +
 lib/RT/Authen/ExternalAuth/DBI.pm                    | 1 +
 lib/RT/Authen/ExternalAuth/DBI/Cookie.pm             | 1 +
 lib/RT/Authen/ExternalAuth/LDAP.pm                   | 1 +
 lib/RT/Authen/Token.pm                               | 1 +
 lib/RT/Config.pm                                     | 1 +
 lib/RT/Crypt.pm                                      | 1 +
 lib/RT/Crypt/GnuPG.pm                                | 1 +
 lib/RT/Crypt/Role.pm                                 | 1 +
 lib/RT/Crypt/SMIME.pm                                | 1 +
 lib/RT/Dashboard/Mailer.pm                           | 1 +
 lib/RT/DependencyWalker.pm                           | 1 +
 lib/RT/DependencyWalker/FindDependencies.pm          | 1 +
 lib/RT/ExternalStorage.pm                            | 1 +
 lib/RT/ExternalStorage/AmazonS3.pm                   | 1 +
 lib/RT/ExternalStorage/Backend.pm                    | 1 +
 lib/RT/ExternalStorage/Disk.pm                       | 1 +
 lib/RT/ExternalStorage/Dropbox.pm                    | 1 +
 lib/RT/Graph/Tickets.pm                              | 1 +
 lib/RT/Handle.pm                                     | 1 +
 lib/RT/Initialdata/JSON.pm                           | 1 +
 lib/RT/Installer.pm                                  | 1 +
 lib/RT/Interface/Email.pm                            | 1 +
 lib/RT/Interface/Email/Action/Defaults.pm            | 1 +
 lib/RT/Interface/Email/Action/Resolve.pm             | 1 +
 lib/RT/Interface/Email/Action/Take.pm                | 1 +
 lib/RT/Interface/Email/Auth/MailFrom.pm              | 1 +
 lib/RT/Interface/Email/Authz/Default.pm              | 1 +
 lib/RT/Interface/Email/Authz/RequireEncrypted.pm     | 1 +
 lib/RT/Interface/Email/Crypt.pm                      | 1 +
 lib/RT/Interface/Email/Role.pm                       | 1 +
 lib/RT/Interface/Web.pm                              | 1 +
 lib/RT/Interface/Web/Handler.pm                      | 1 +
 lib/RT/Interface/Web/MenuBuilder.pm                  | 1 +
 lib/RT/Interface/Web/QueryBuilder.pm                 | 1 +
 lib/RT/Interface/Web/Session.pm                      | 1 +
 lib/RT/Lifecycle.pm                                  | 1 +
 lib/RT/Migrate.pm                                    | 1 +
 lib/RT/Migrate/Importer.pm                           | 1 +
 lib/RT/Migrate/Incremental.pm                        | 1 +
 lib/RT/Plugin.pm                                     | 1 +
 lib/RT/REST2.pm                                      | 1 +
 lib/RT/REST2/Dispatcher.pm                           | 1 +
 lib/RT/REST2/Resource/Collection/ProcessPOSTasGET.pm | 1 +
 lib/RT/REST2/Resource/Collection/QueryByJSON.pm      | 1 +
 lib/RT/REST2/Resource/Collection/QueryBySQL.pm       | 1 +
 lib/RT/REST2/Resource/Collection/Search.pm           | 1 +
 lib/RT/REST2/Resource/Record/Deletable.pm            | 1 +
 lib/RT/REST2/Resource/Record/DeletableByDisabling.pm | 1 +
 lib/RT/REST2/Resource/Record/Hypermedia.pm           | 1 +
 lib/RT/REST2/Resource/Record/Readable.pm             | 1 +
 lib/RT/REST2/Resource/Record/WithETag.pm             | 1 +
 lib/RT/REST2/Resource/Record/Writable.pm             | 1 +
 lib/RT/REST2/Resource/Role/RequestBodyIsJSON.pm      | 1 +
 lib/RT/REST2/Util.pm                                 | 1 +
 lib/RT/Record/Role.pm                                | 1 +
 lib/RT/Record/Role/Lifecycle.pm                      | 1 +
 lib/RT/Record/Role/Links.pm                          | 1 +
 lib/RT/Record/Role/LookupType.pm                     | 1 +
 lib/RT/Record/Role/Rights.pm                         | 1 +
 lib/RT/Record/Role/Roles.pm                          | 1 +
 lib/RT/Record/Role/Status.pm                         | 1 +
 lib/RT/Report.pm                                     | 1 +
 lib/RT/RightsInspector.pm                            | 1 +
 lib/RT/SLA.pm                                        | 1 +
 lib/RT/SQL.pm                                        | 1 +
 lib/RT/Search.pm                                     | 1 +
 lib/RT/SearchBuilder/Role.pm                         | 1 +
 lib/RT/SearchBuilder/Role/Roles.pm                   | 1 +
 lib/RT/Shredder.pm                                   | 1 +
 lib/RT/Shredder/Constants.pm                         | 1 +
 lib/RT/Shredder/Dependencies.pm                      | 1 +
 lib/RT/Shredder/Dependency.pm                        | 1 +
 lib/RT/Shredder/Plugin.pm                            | 1 +
 lib/RT/Shredder/Plugin/Base.pm                       | 1 +
 lib/RT/Shredder/RawRecord.pm                         | 1 +
 lib/RT/Test/Apache.pm                                | 1 +
 lib/RT/Test/FTS.pm                                   | 1 +
 t/99-policy.t                                        | 9 +++++++++
 80 files changed, 88 insertions(+)

diff --git a/lib/RT/Approval.pm b/lib/RT/Approval.pm
index 77be97aa..29204bc5 100644
--- a/lib/RT/Approval.pm
+++ b/lib/RT/Approval.pm
@@ -62,6 +62,7 @@ RT::Ruleset->Add(
         'RT::Approval::Rule::Created',
     ]);
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Authen/ExternalAuth.pm b/lib/RT/Authen/ExternalAuth.pm
index 4527ed0e..55bab430 100644
--- a/lib/RT/Authen/ExternalAuth.pm
+++ b/lib/RT/Authen/ExternalAuth.pm
@@ -782,6 +782,7 @@ sub LoadUserObject {
     return $user;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Authen/ExternalAuth/DBI.pm b/lib/RT/Authen/ExternalAuth/DBI.pm
index 38e5581d..11c22a5a 100644
--- a/lib/RT/Authen/ExternalAuth/DBI.pm
+++ b/lib/RT/Authen/ExternalAuth/DBI.pm
@@ -725,6 +725,7 @@ sub _GetBoundDBIObj {
 
 # }}}
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Authen/ExternalAuth/DBI/Cookie.pm b/lib/RT/Authen/ExternalAuth/DBI/Cookie.pm
index ef378c38..1c130bd0 100644
--- a/lib/RT/Authen/ExternalAuth/DBI/Cookie.pm
+++ b/lib/RT/Authen/ExternalAuth/DBI/Cookie.pm
@@ -154,6 +154,7 @@ sub GetCookieVal {
 
 # }}}
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Authen/ExternalAuth/LDAP.pm b/lib/RT/Authen/ExternalAuth/LDAP.pm
index 5ccbadd9..375901cd 100644
--- a/lib/RT/Authen/ExternalAuth/LDAP.pm
+++ b/lib/RT/Authen/ExternalAuth/LDAP.pm
@@ -800,6 +800,7 @@ sub _GetBoundLdapObj {
 
 # }}}
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Authen/Token.pm b/lib/RT/Authen/Token.pm
index 0fcb16ff..661b20eb 100644
--- a/lib/RT/Authen/Token.pm
+++ b/lib/RT/Authen/Token.pm
@@ -133,6 +133,7 @@ Apache configuration to allow RT to access the Authorization header.
     SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
 =cut
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 53606960..d70c2148 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -3247,6 +3247,7 @@ sub _GetFromFilesOnly {
     return $original_setting_from_files{$name} ? $original_setting_from_files{$name}[0] : undef;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Crypt.pm b/lib/RT/Crypt.pm
index 5ddfb9ea..0590b5be 100644
--- a/lib/RT/Crypt.pm
+++ b/lib/RT/Crypt.pm
@@ -907,6 +907,7 @@ sub GetKeysInfo {
     return $self->SimpleImplementationCall( %args );
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Crypt/GnuPG.pm b/lib/RT/Crypt/GnuPG.pm
index e549c7b1..16333225 100644
--- a/lib/RT/Crypt/GnuPG.pm
+++ b/lib/RT/Crypt/GnuPG.pm
@@ -2103,6 +2103,7 @@ sub GetPubkey {
     return join( '', @pubkey );
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Crypt/Role.pm b/lib/RT/Crypt/Role.pm
index 975a74f6..b4cb571c 100644
--- a/lib/RT/Crypt/Role.pm
+++ b/lib/RT/Crypt/Role.pm
@@ -254,6 +254,7 @@ sub ParseDate {
 }
 
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Crypt/SMIME.pm b/lib/RT/Crypt/SMIME.pm
index 0a398987..01e785e0 100644
--- a/lib/RT/Crypt/SMIME.pm
+++ b/lib/RT/Crypt/SMIME.pm
@@ -1349,6 +1349,7 @@ sub GetCertificateForTransaction {
     return $out;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Dashboard/Mailer.pm b/lib/RT/Dashboard/Mailer.pm
index f69aab78..398c6f46 100644
--- a/lib/RT/Dashboard/Mailer.pm
+++ b/lib/RT/Dashboard/Mailer.pm
@@ -838,6 +838,7 @@ sub GetResource {
     }
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/DependencyWalker.pm b/lib/RT/DependencyWalker.pm
index d3dc101d..f9d9d8e0 100644
--- a/lib/RT/DependencyWalker.pm
+++ b/lib/RT/DependencyWalker.pm
@@ -300,6 +300,7 @@ sub PrependDeps {
     }
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/DependencyWalker/FindDependencies.pm b/lib/RT/DependencyWalker/FindDependencies.pm
index 1a0a9be3..976c2180 100644
--- a/lib/RT/DependencyWalker/FindDependencies.pm
+++ b/lib/RT/DependencyWalker/FindDependencies.pm
@@ -62,6 +62,7 @@ sub Add {
     push @{$self->{$dir}}, $obj;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/ExternalStorage.pm b/lib/RT/ExternalStorage.pm
index 41392b33..5ec9df48 100644
--- a/lib/RT/ExternalStorage.pm
+++ b/lib/RT/ExternalStorage.pm
@@ -131,6 +131,7 @@ storage.
 
 =cut
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/ExternalStorage/AmazonS3.pm b/lib/RT/ExternalStorage/AmazonS3.pm
index f6023809..6e9ce287 100644
--- a/lib/RT/ExternalStorage/AmazonS3.pm
+++ b/lib/RT/ExternalStorage/AmazonS3.pm
@@ -355,6 +355,7 @@ need to open permissions further for users to access the attachment via the dire
 
 =cut
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/ExternalStorage/Backend.pm b/lib/RT/ExternalStorage/Backend.pm
index 09b191df..735e4298 100644
--- a/lib/RT/ExternalStorage/Backend.pm
+++ b/lib/RT/ExternalStorage/Backend.pm
@@ -88,6 +88,7 @@ sub new {
     $self->Init;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/ExternalStorage/Disk.pm b/lib/RT/ExternalStorage/Disk.pm
index b6e35004..f00ca75e 100644
--- a/lib/RT/ExternalStorage/Disk.pm
+++ b/lib/RT/ExternalStorage/Disk.pm
@@ -172,6 +172,7 @@ internal inconsistency.
 
 =cut
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/ExternalStorage/Dropbox.pm b/lib/RT/ExternalStorage/Dropbox.pm
index 0588e544..af5bb163 100644
--- a/lib/RT/ExternalStorage/Dropbox.pm
+++ b/lib/RT/ExternalStorage/Dropbox.pm
@@ -264,6 +264,7 @@ Copy the provided values into your F<RT_SiteConfig.pm>:
 
 =cut
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
index 5da2fa50..28bf6a32 100644
--- a/lib/RT/Graph/Tickets.pm
+++ b/lib/RT/Graph/Tickets.pm
@@ -378,6 +378,7 @@ sub TicketLinks {
     return $args{'Graph'};
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 9c337d07..2536bd57 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -3384,6 +3384,7 @@ sub SimpleQuery {
 
 __PACKAGE__->FinalizeDatabaseType;
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Initialdata/JSON.pm b/lib/RT/Initialdata/JSON.pm
index 23a7cbad..e1a1bfb4 100644
--- a/lib/RT/Initialdata/JSON.pm
+++ b/lib/RT/Initialdata/JSON.pm
@@ -129,6 +129,7 @@ sub Load {
 }
 
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Installer.pm b/lib/RT/Installer.pm
index 721eec4b..74743662 100644
--- a/lib/RT/Installer.pm
+++ b/lib/RT/Installer.pm
@@ -311,6 +311,7 @@ C<RT::Installer> class provides access to RT Installer Meta
 
 =cut
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index 601261e0..7a13c689 100644
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -1607,6 +1607,7 @@ sub _HTMLFormatText {
 }
 
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email/Action/Defaults.pm b/lib/RT/Interface/Email/Action/Defaults.pm
index 3445effc..d0171780 100644
--- a/lib/RT/Interface/Email/Action/Defaults.pm
+++ b/lib/RT/Interface/Email/Action/Defaults.pm
@@ -147,6 +147,7 @@ sub _HandleEither {
     return if $status;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email/Action/Resolve.pm b/lib/RT/Interface/Email/Action/Resolve.pm
index 878662bf..b0c28112 100644
--- a/lib/RT/Interface/Email/Action/Resolve.pm
+++ b/lib/RT/Interface/Email/Action/Resolve.pm
@@ -134,6 +134,7 @@ sub HandleResolve {
     );
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email/Action/Take.pm b/lib/RT/Interface/Email/Action/Take.pm
index ad28da79..a33b9da6 100644
--- a/lib/RT/Interface/Email/Action/Take.pm
+++ b/lib/RT/Interface/Email/Action/Take.pm
@@ -122,6 +122,7 @@ sub HandleTake {
     );
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email/Auth/MailFrom.pm b/lib/RT/Interface/Email/Auth/MailFrom.pm
index d93379d7..3f61d6dc 100644
--- a/lib/RT/Interface/Email/Auth/MailFrom.pm
+++ b/lib/RT/Interface/Email/Auth/MailFrom.pm
@@ -109,6 +109,7 @@ sub GetCurrentUser {
     return $CurrentUser;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email/Authz/Default.pm b/lib/RT/Interface/Email/Authz/Default.pm
index 5ab31c41..2596c147 100644
--- a/lib/RT/Interface/Email/Authz/Default.pm
+++ b/lib/RT/Interface/Email/Authz/Default.pm
@@ -138,6 +138,7 @@ EOT
     );
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email/Authz/RequireEncrypted.pm b/lib/RT/Interface/Email/Authz/RequireEncrypted.pm
index bff754a5..ea5901fe 100644
--- a/lib/RT/Interface/Email/Authz/RequireEncrypted.pm
+++ b/lib/RT/Interface/Email/Authz/RequireEncrypted.pm
@@ -89,6 +89,7 @@ sub BeforeDecode {
     FAILURE('rejected because the message is unencrypted');
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email/Crypt.pm b/lib/RT/Interface/Email/Crypt.pm
index a063e5fd..8a7357f0 100644
--- a/lib/RT/Interface/Email/Crypt.pm
+++ b/lib/RT/Interface/Email/Crypt.pm
@@ -233,6 +233,7 @@ sub EmailErrorToSender {
     return 0;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Email/Role.pm b/lib/RT/Interface/Email/Role.pm
index 63238bab..35d5ce35 100644
--- a/lib/RT/Interface/Email/Role.pm
+++ b/lib/RT/Interface/Email/Role.pm
@@ -142,6 +142,7 @@ sub SUCCESS { RT::Interface::Email::SUCCESS(@_) }
 
 sub MailError { RT::Interface::Email::MailError(@_) }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 172482a0..32b1d5f1 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -6079,6 +6079,7 @@ sub ProcessEmailAddresses {
 }
 
 package RT::Interface::Web;
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Web/Handler.pm b/lib/RT/Interface/Web/Handler.pm
index f9ea8001..581bb2f6 100644
--- a/lib/RT/Interface/Web/Handler.pm
+++ b/lib/RT/Interface/Web/Handler.pm
@@ -409,6 +409,7 @@ sub GetStatic {
     return $response;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index b2adb3d2..514e7b06 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -1859,6 +1859,7 @@ sub GetSVGImage {
     return $svg;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Web/QueryBuilder.pm b/lib/RT/Interface/Web/QueryBuilder.pm
index 73473e0c..05e82917 100644
--- a/lib/RT/Interface/Web/QueryBuilder.pm
+++ b/lib/RT/Interface/Web/QueryBuilder.pm
@@ -51,6 +51,7 @@ package RT::Interface::Web::QueryBuilder;
 use strict;
 use warnings;
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Interface/Web/Session.pm b/lib/RT/Interface/Web/Session.pm
index 8a0929c1..18233927 100644
--- a/lib/RT/Interface/Web/Session.pm
+++ b/lib/RT/Interface/Web/Session.pm
@@ -337,6 +337,7 @@ sub TIEHASH {
     return tied %session;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Lifecycle.pm b/lib/RT/Lifecycle.pm
index cbe27913..fe04f3c9 100644
--- a/lib/RT/Lifecycle.pm
+++ b/lib/RT/Lifecycle.pm
@@ -1342,6 +1342,7 @@ sub UpdateLifecycleLayout {
     return 1;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Migrate.pm b/lib/RT/Migrate.pm
index 47b51929..9b80c788 100644
--- a/lib/RT/Migrate.pm
+++ b/lib/RT/Migrate.pm
@@ -199,6 +199,7 @@ sub setup_logging {
     return $logger ? $logger->{filename} : undef;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm
index a0dae683..70d5a6e7 100644
--- a/lib/RT/Migrate/Importer.pm
+++ b/lib/RT/Migrate/Importer.pm
@@ -920,6 +920,7 @@ sub RunSQL {
     return $rv;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Migrate/Incremental.pm b/lib/RT/Migrate/Incremental.pm
index d80e360e..e9a622dd 100644
--- a/lib/RT/Migrate/Incremental.pm
+++ b/lib/RT/Migrate/Incremental.pm
@@ -661,6 +661,7 @@ This is a forward of ticket #{ $Ticket->id }
 
 );
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Plugin.pm b/lib/RT/Plugin.pm
index a2d806f6..5d2664c6 100644
--- a/lib/RT/Plugin.pm
+++ b/lib/RT/Plugin.pm
@@ -148,6 +148,7 @@ Returns the directory this plugin has installed its message catalogs into.
 
 sub PoDir { return $_[0]->Path('po') }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2.pm b/lib/RT/REST2.pm
index 97c48c6e..42a05054 100644
--- a/lib/RT/REST2.pm
+++ b/lib/RT/REST2.pm
@@ -1479,6 +1479,7 @@ sub PSGIWrap {
     };
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Dispatcher.pm b/lib/RT/REST2/Dispatcher.pm
index 25c3fea3..48b03d45 100644
--- a/lib/RT/REST2/Dispatcher.pm
+++ b/lib/RT/REST2/Dispatcher.pm
@@ -125,6 +125,7 @@ sub to_psgi_app {
     };
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Collection/ProcessPOSTasGET.pm b/lib/RT/REST2/Resource/Collection/ProcessPOSTasGET.pm
index 24d0342f..6e567c39 100644
--- a/lib/RT/REST2/Resource/Collection/ProcessPOSTasGET.pm
+++ b/lib/RT/REST2/Resource/Collection/ProcessPOSTasGET.pm
@@ -68,6 +68,7 @@ sub process_post {
     }
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Collection/QueryByJSON.pm b/lib/RT/REST2/Resource/Collection/QueryByJSON.pm
index 201dd7c3..9ae8a66d 100644
--- a/lib/RT/REST2/Resource/Collection/QueryByJSON.pm
+++ b/lib/RT/REST2/Resource/Collection/QueryByJSON.pm
@@ -145,6 +145,7 @@ sub limit_collection_from_json {
     return 1;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Collection/QueryBySQL.pm b/lib/RT/REST2/Resource/Collection/QueryBySQL.pm
index 09ee87b4..3ec0fbea 100644
--- a/lib/RT/REST2/Resource/Collection/QueryBySQL.pm
+++ b/lib/RT/REST2/Resource/Collection/QueryBySQL.pm
@@ -85,6 +85,7 @@ sub limit_collection_from_sql {
     return 1;
 };
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Collection/Search.pm b/lib/RT/REST2/Resource/Collection/Search.pm
index 6f1d2ae1..b791f7a3 100644
--- a/lib/RT/REST2/Resource/Collection/Search.pm
+++ b/lib/RT/REST2/Resource/Collection/Search.pm
@@ -206,6 +206,7 @@ around BUILDARGS => sub {
     return $class->$orig( %args );
 };
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Record/Deletable.pm b/lib/RT/REST2/Resource/Record/Deletable.pm
index 30c80ace..58b9d42b 100644
--- a/lib/RT/REST2/Resource/Record/Deletable.pm
+++ b/lib/RT/REST2/Resource/Record/Deletable.pm
@@ -65,6 +65,7 @@ sub delete_resource {
     return $ok;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Record/DeletableByDisabling.pm b/lib/RT/REST2/Resource/Record/DeletableByDisabling.pm
index 3096cb46..b257ad5f 100644
--- a/lib/RT/REST2/Resource/Record/DeletableByDisabling.pm
+++ b/lib/RT/REST2/Resource/Record/DeletableByDisabling.pm
@@ -68,6 +68,7 @@ sub delete_resource {
     return $ok;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Record/Hypermedia.pm b/lib/RT/REST2/Resource/Record/Hypermedia.pm
index 3d0aaa2a..c07a49d3 100644
--- a/lib/RT/REST2/Resource/Record/Hypermedia.pm
+++ b/lib/RT/REST2/Resource/Record/Hypermedia.pm
@@ -174,6 +174,7 @@ sub _customrole_links {
     return @links;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Record/Readable.pm b/lib/RT/REST2/Resource/Record/Readable.pm
index 22804522..f01edc2b 100644
--- a/lib/RT/REST2/Resource/Record/Readable.pm
+++ b/lib/RT/REST2/Resource/Record/Readable.pm
@@ -104,6 +104,7 @@ sub to_json {
     return JSON::to_json($self->serialize, { pretty => 1 });
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Record/WithETag.pm b/lib/RT/REST2/Resource/Record/WithETag.pm
index 196fd1a4..89058b02 100644
--- a/lib/RT/REST2/Resource/Record/WithETag.pm
+++ b/lib/RT/REST2/Resource/Record/WithETag.pm
@@ -81,6 +81,7 @@ sub generate_etag {
     return $self->last_modified;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Record/Writable.pm b/lib/RT/REST2/Resource/Record/Writable.pm
index c74c814c..8bf29e45 100644
--- a/lib/RT/REST2/Resource/Record/Writable.pm
+++ b/lib/RT/REST2/Resource/Record/Writable.pm
@@ -410,6 +410,7 @@ sub create_resource {
     }
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Resource/Role/RequestBodyIsJSON.pm b/lib/RT/REST2/Resource/Role/RequestBodyIsJSON.pm
index b9270345..18eb42ac 100644
--- a/lib/RT/REST2/Resource/Role/RequestBodyIsJSON.pm
+++ b/lib/RT/REST2/Resource/Role/RequestBodyIsJSON.pm
@@ -94,6 +94,7 @@ role {
     };
 };
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/REST2/Util.pm b/lib/RT/REST2/Util.pm
index 0f5c8aa4..981fc4e2 100644
--- a/lib/RT/REST2/Util.pm
+++ b/lib/RT/REST2/Util.pm
@@ -666,6 +666,7 @@ sub fix_custom_role_ids
     return $ret;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Record/Role.pm b/lib/RT/Record/Role.pm
index bcb291e2..ac0fdd77 100644
--- a/lib/RT/Record/Role.pm
+++ b/lib/RT/Record/Role.pm
@@ -75,6 +75,7 @@ requires $_ for qw(
     _NewTransaction
 );
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Record/Role/Lifecycle.pm b/lib/RT/Record/Role/Lifecycle.pm
index 9319c845..28cfc12d 100644
--- a/lib/RT/Record/Role/Lifecycle.pm
+++ b/lib/RT/Record/Role/Lifecycle.pm
@@ -216,6 +216,7 @@ sub IsInactiveStatus {
     return $self->LifecycleObj->IsInactive( shift );
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Record/Role/Links.pm b/lib/RT/Record/Role/Links.pm
index 9cae95de..be5e0ca0 100644
--- a/lib/RT/Record/Role/Links.pm
+++ b/lib/RT/Record/Role/Links.pm
@@ -171,6 +171,7 @@ sub DeleteLink {
     return $self->_DeleteLink(@_);
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Record/Role/LookupType.pm b/lib/RT/Record/Role/LookupType.pm
index 3f065a44..5d5d2a62 100644
--- a/lib/RT/Record/Role/LookupType.pm
+++ b/lib/RT/Record/Role/LookupType.pm
@@ -287,6 +287,7 @@ sub IsOnlyGlobal {
 
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Record/Role/Rights.pm b/lib/RT/Record/Role/Rights.pm
index 69b6ad39..9f49b25f 100644
--- a/lib/RT/Record/Role/Rights.pm
+++ b/lib/RT/Record/Role/Rights.pm
@@ -130,6 +130,7 @@ sub RightCategories {
     return \%rights;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Record/Role/Roles.pm b/lib/RT/Record/Role/Roles.pm
index e03a474b..1ed3a738 100644
--- a/lib/RT/Record/Role/Roles.pm
+++ b/lib/RT/Record/Role/Roles.pm
@@ -902,6 +902,7 @@ sub RoleAddresses {
     return undef;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Record/Role/Status.pm b/lib/RT/Record/Role/Status.pm
index a40a4a1d..dd75e6ae 100644
--- a/lib/RT/Record/Role/Status.pm
+++ b/lib/RT/Record/Role/Status.pm
@@ -311,6 +311,7 @@ sub _SetLifecycleColumn {
     }
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Report.pm b/lib/RT/Report.pm
index af7ba679..1aecd58b 100644
--- a/lib/RT/Report.pm
+++ b/lib/RT/Report.pm
@@ -1993,6 +1993,7 @@ sub _CollectionClass {
     return $class;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/RightsInspector.pm b/lib/RT/RightsInspector.pm
index 5141ea59..793999a8 100644
--- a/lib/RT/RightsInspector.pm
+++ b/lib/RT/RightsInspector.pm
@@ -876,6 +876,7 @@ sub URLForRecord {
     return undef;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/SLA.pm b/lib/RT/SLA.pm
index 01f7675f..05f0cb55 100644
--- a/lib/RT/SLA.pm
+++ b/lib/RT/SLA.pm
@@ -252,6 +252,7 @@ sub GetDefaultServiceLevel {
     return $config{'Default'};
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/SQL.pm b/lib/RT/SQL.pm
index 4f4d3037..39a15d15 100644
--- a/lib/RT/SQL.pm
+++ b/lib/RT/SQL.pm
@@ -318,6 +318,7 @@ sub _Optimize {
     return $tree;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Search.pm b/lib/RT/Search.pm
index 449e4a27..90682fd9 100644
--- a/lib/RT/Search.pm
+++ b/lib/RT/Search.pm
@@ -130,6 +130,7 @@ sub Prepare {
     return (1);
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/SearchBuilder/Role.pm b/lib/RT/SearchBuilder/Role.pm
index 8a9f71a2..4f283bf3 100644
--- a/lib/RT/SearchBuilder/Role.pm
+++ b/lib/RT/SearchBuilder/Role.pm
@@ -74,6 +74,7 @@ requires $_ for qw(
     _CloseParen
 );
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/SearchBuilder/Role/Roles.pm b/lib/RT/SearchBuilder/Role/Roles.pm
index eb76bdd0..333f2056 100644
--- a/lib/RT/SearchBuilder/Role/Roles.pm
+++ b/lib/RT/SearchBuilder/Role/Roles.pm
@@ -489,6 +489,7 @@ sub RoleLimit {
     return ($groups, $group_members, $cgm_2, $group_members_2, $users);
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Shredder.pm b/lib/RT/Shredder.pm
index 86eb7ec9..33374fd4 100644
--- a/lib/RT/Shredder.pm
+++ b/lib/RT/Shredder.pm
@@ -824,6 +824,7 @@ sub RollbackDumpTo {
 }
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Shredder/Constants.pm b/lib/RT/Shredder/Constants.pm
index 79620e49..5219918b 100644
--- a/lib/RT/Shredder/Constants.pm
+++ b/lib/RT/Shredder/Constants.pm
@@ -111,6 +111,7 @@ use constant {
     WIPED     => 0x020,
 };
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Shredder/Dependencies.pm b/lib/RT/Shredder/Dependencies.pm
index e0d22c0a..7c16cab0 100644
--- a/lib/RT/Shredder/Dependencies.pm
+++ b/lib/RT/Shredder/Dependencies.pm
@@ -148,6 +148,7 @@ sub List
         @{ $self->{'list'} };
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Shredder/Dependency.pm b/lib/RT/Shredder/Dependency.pm
index b80c7b88..c51b4ac5 100644
--- a/lib/RT/Shredder/Dependency.pm
+++ b/lib/RT/Shredder/Dependency.pm
@@ -109,6 +109,7 @@ sub TargetClass { return ref $_[0]->{'TargetObject'} }
 sub BaseClass {    return ref $_[0]->{'BaseObject'} }
 sub Class { return ref shift()->Object( @_ ) }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Shredder/Plugin.pm b/lib/RT/Shredder/Plugin.pm
index db5d6fed..7e5cb893 100644
--- a/lib/RT/Shredder/Plugin.pm
+++ b/lib/RT/Shredder/Plugin.pm
@@ -252,6 +252,7 @@ sub Rebless
     return;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Shredder/Plugin/Base.pm b/lib/RT/Shredder/Plugin/Base.pm
index 5da1840b..41152c64 100644
--- a/lib/RT/Shredder/Plugin/Base.pm
+++ b/lib/RT/Shredder/Plugin/Base.pm
@@ -197,6 +197,7 @@ sub ConvertMaskToSQL {
     return $mask;
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Shredder/RawRecord.pm b/lib/RT/Shredder/RawRecord.pm
index 9d429bd7..ea3c1014 100644
--- a/lib/RT/Shredder/RawRecord.pm
+++ b/lib/RT/Shredder/RawRecord.pm
@@ -148,6 +148,7 @@ sub __Wipeout {
 
 sub Table { return $_[0]->{'Table'} }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Test/Apache.pm b/lib/RT/Test/Apache.pm
index 5726e7f8..8ccdb825 100644
--- a/lib/RT/Test/Apache.pm
+++ b/lib/RT/Test/Apache.pm
@@ -309,6 +309,7 @@ sub process_in_file {
     return ($out_fh, $out_conf);
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/lib/RT/Test/FTS.pm b/lib/RT/Test/FTS.pm
index 2645e5e5..8610a3ed 100644
--- a/lib/RT/Test/FTS.pm
+++ b/lib/RT/Test/FTS.pm
@@ -102,6 +102,7 @@ sub sync_index {
         or Test::More::diag("output: $output");
 }
 
+require RT::Base;
 RT::Base->_ImportOverlays();
 
 1;
diff --git a/t/99-policy.t b/t/99-policy.t
index b1eb9891..dd4cdd8c 100644
--- a/t/99-policy.t
+++ b/t/99-policy.t
@@ -84,6 +84,15 @@ sub check {
         if ( $check{overlays} ) {
             if ( $content !~ qr/^# RT::Base->_ImportOverlays\(\); # No overlays on purpose/m ) {
                 like( $content, qr/^(?:__PACKAGE__|RT::Base)->_ImportOverlays\(\);/m, "$file has no overlays" );
+
+                if ( $content =~ /^RT::Base->_ImportOverlays\(\);/m ) {
+                    ok(
+                        $content =~ /use\s+(?:base|parent)/
+                            || $content =~ /^extends\s/m
+                            || $content =~ /^require RT::Base;/m,
+                        "$file requires RT::Base before _ImportOverlays"
+                    );
+                }
             }
         }
     }