File | /wise/base/static/lib/perl5/site_perl/5.10.0/DBIx/Class/StartupCheck.pm | Statements Executed | 8 | Total Time | 0.000229 seconds |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine | |
---|---|---|---|---|---|---|
1 | 1 | 1 | 1.9e-5 | 1.9e-5 | DBIx::Class::StartupCheck:: | _possibly_has_bad_overload_performance |
0 | 0 | 0 | 0 | 0 | DBIx::Class::StartupCheck:: | BEGIN |
0 | 0 | 0 | 0 | 0 | DBIx::Class::StartupCheck:: | _has_bug_34925 |
0 | 0 | 0 | 0 | 0 | TestRHBug:: | BEGIN |
0 | 0 | 0 | 0 | 0 | TestRHBug:: | __ANON__[:5] |
Line | Stmts. | Exclusive Time | Avg. | Code |
---|---|---|---|---|
1 | package DBIx::Class::StartupCheck; | |||
2 | ||||
3 | BEGIN { | |||
4 | ||||
5 | 4 | 0.00018 | 4.4e-5 | { package TestRHBug; use overload bool => sub { 0 } } # spent 87µs making 1 call to overload::import |
6 | ||||
7 | sub _has_bug_34925 { | |||
8 | my %thing; | |||
9 | my $r1 = \%thing; | |||
10 | my $r2 = \%thing; | |||
11 | bless $r1 => 'TestRHBug'; | |||
12 | return !!$r2; | |||
13 | } | |||
14 | ||||
15 | # spent 19µs within DBIx::Class::StartupCheck::_possibly_has_bad_overload_performance which was called
# once (19µs+0) by DBIx::Class::StartupCheck::BEGIN at line 19 | |||
16 | 1 | 1.3e-5 | 1.3e-5 | return $] < 5.008009 && ! _has_bug_34925(); |
17 | } | |||
18 | ||||
19 | 1 | 1.7e-5 | 1.7e-5 | unless ($ENV{DBIC_NO_WARN_BAD_PERL}) { # spent 19µs making 1 call to DBIx::Class::StartupCheck::_possibly_has_bad_overload_performance |
20 | if (_possibly_has_bad_overload_performance()) { | |||
21 | print STDERR "\n\nWARNING: " . __PACKAGE__ . ": This version of Perl is likely to exhibit\n" . | |||
22 | "extremely slow performance for certain critical operations.\n" . | |||
23 | "Please consider recompiling Perl. For more information, see\n" . | |||
24 | "https://bugzilla.redhat.com/show_bug.cgi?id=196836 and/or\n" . | |||
25 | "http://lists.scsys.co.uk/pipermail/dbix-class/2007-October/005119.html.\n" . | |||
26 | "You can suppress this message by setting DBIC_NO_WARN_BAD_PERL=1 in your\n" . | |||
27 | "environment.\n\n"; | |||
28 | } | |||
29 | } | |||
30 | 1 | 1.8e-5 | 1.8e-5 | } |
31 | ||||
32 | =head1 NAME | |||
33 | ||||
34 | DBIx::Class::StartupCheck - Run environment checks on startup | |||
35 | ||||
36 | =head1 SYNOPSIS | |||
37 | ||||
38 | use DBIx::Class::StartupCheck; | |||
39 | ||||
40 | =head1 DESCRIPTION | |||
41 | ||||
42 | Currently this module checks for, and if necessary issues a warning for, a | |||
43 | particular bug found on RedHat systems from perl-5.8.8-10 and up. Other checks | |||
44 | may be added from time to time. | |||
45 | ||||
46 | Any checks herein can be disabled by setting an appropriate environment | |||
47 | variable. If your system suffers from a particular bug, you will get a warning | |||
48 | message on startup sent to STDERR, explaining what to do about it and how to | |||
49 | suppress the message. If you don't see any messages, you have nothing to worry | |||
50 | about. | |||
51 | ||||
52 | =head1 CONTRIBUTORS | |||
53 | ||||
54 | Nigel Metheringham | |||
55 | ||||
56 | Brandon Black | |||
57 | ||||
58 | Matt S. Trout | |||
59 | ||||
60 | =head1 AUTHOR | |||
61 | ||||
62 | Jon Schutz | |||
63 | ||||
64 | =head1 LICENSE | |||
65 | ||||
66 | You may distribute this code under the same terms as Perl itself. | |||
67 | ||||
68 | =cut | |||
69 | ||||
70 | 1 | 3.0e-6 | 3.0e-6 | 1; |