Bring back _TempExtlib (d0435d75), this time for Sub::Quote
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / StartupCheck.pm
CommitLineData
11736b4c 1package DBIx::Class::StartupCheck;
2
b46b8537 3# Temporary - tempextlib
4use warnings;
5use strict;
6use namespace::clean;
7BEGIN {
8 # There can be only one of these, make sure we get the bundled part and
9 # *not* something off the site lib
10 for (qw(
11 Sub::Quote
12 )) {
13 (my $incfn = "$_.pm") =~ s|::|/|g;
14
15 if ($INC{$incfn}) {
16 die "\n\t*TEMPORARY* TRIAL RELEASE REQUIREMENTS VIOLATED\n\n"
17 . "Unable to continue - a part of the bundled templib contents "
18 . "was already loaded (likely an older version from CPAN). "
19 . "Make sure that @{[ __PACKAGE__ ]} is loaded before $_\n"
20 . "\n\tThis *WILL NOT* be necessary for the official DBIC release\n\n"
21 ;
22 }
23 }
24
25 require File::Spec;
26 our ($HERE) = File::Spec->rel2abs(
27 File::Spec->catdir( (File::Spec->splitpath(__FILE__))[1], '_TempExtlib' )
28 ) =~ /^(.*)$/; # screw you, taint mode
29
30 die "TempExtlib $HERE does not seem to exist - perhaps you need to run `perl Makefile.PL` in the DBIC checkout?\n"
31 unless -d $HERE;
32
33 unshift @INC, $HERE;
34}
35
a2bd3796 361;
37
38__END__
39
11736b4c 40=head1 NAME
41
42DBIx::Class::StartupCheck - Run environment checks on startup
43
44=head1 SYNOPSIS
45
46 use DBIx::Class::StartupCheck;
d4daee7b 47
11736b4c 48=head1 DESCRIPTION
49
dc253b77 50This module used to check for, and if necessary issue a warning for, a
51particular bug found on Red Hat and Fedora systems using their system
52perl build. As of September 2008 there are fixed versions of perl for
53all current Red Hat and Fedora distributions, but the old check still
54triggers, incorrectly flagging those versions of perl to be buggy. A
55more comprehensive check has been moved into the test suite in
56C<t/99rh_perl_perf_bug.t> and further information about the bug has been
48580715 57put in L<DBIx::Class::Manual::Troubleshooting>.
dc253b77 58
59Other checks may be added from time to time.
11736b4c 60
61Any checks herein can be disabled by setting an appropriate environment
dc253b77 62variable. If your system suffers from a particular bug, you will get a
63warning message on startup sent to STDERR, explaining what to do about
64it and how to suppress the message. If you don't see any messages, you
65have nothing to worry about.
11736b4c 66
a2bd3796 67=head1 FURTHER QUESTIONS?
11736b4c 68
a2bd3796 69Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
11736b4c 70
a2bd3796 71=head1 COPYRIGHT AND LICENSE
11736b4c 72
a2bd3796 73This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
74by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
75redistribute it and/or modify it under the same terms as the
76L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.