1 |
tove 10/01/07 07:54:28 |
2 |
|
3 |
Added: perl510.patch |
4 |
Log: |
5 |
Fix test failure (#299981). Patch from Fedora |
6 |
(Portage version: 2.2_rc61/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-perl/Devel-Profiler/files/perl510.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/Devel-Profiler/files/perl510.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-perl/Devel-Profiler/files/perl510.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: perl510.patch |
15 |
=================================================================== |
16 |
http://cvs.fedoraproject.org/viewvc/devel/perl-Devel-Profiler/perl-Devel-Profiler-perl510.patch |
17 |
--- Devel-Profiler-0.04/lib/Devel/Profiler.pm |
18 |
+++ Devel-Profiler-0.04/lib/Devel/Profiler.pm |
19 |
@@ -151,9 +151,14 @@ sub scan { |
20 |
} |
21 |
|
22 |
# found a code ref? then instrument it |
23 |
- instrument($pkg, $sym, $code) |
24 |
- if defined($code = *{$glob}{CODE}) and ref $code eq 'CODE'; |
25 |
- |
26 |
+ if (ref \$glob ne 'GLOB') { |
27 |
+ # Something stranger in the typeglob, which will expand to (at |
28 |
+ # least) a prototype if we take a reference to it. |
29 |
+ instrument($pkg, $sym, \&{"$pkg$sym"}); |
30 |
+ } else { |
31 |
+ instrument($pkg, $sym, $code) |
32 |
+ if defined($code = *{$glob}{CODE}) and ref $code eq 'CODE'; |
33 |
+ } |
34 |
} |
35 |
} |
36 |
} |
37 |
--- Devel-Profiler-0.04/t/09fcntl.t |
38 |
+++ Devel-Profiler-0.04/t/09fcntl.t |
39 |
@@ -8,7 +8,14 @@ foo(); |
40 |
END |
41 |
|
42 |
# make sure the call tree looks right |
43 |
-check_tree(<<END, "checking tree"); |
44 |
+if ($] > 5.009) { |
45 |
+ # Fcntl's constants are now directly defined, so constant() isn't called. |
46 |
+ check_tree(<<END, "checking tree"); |
47 |
+main::foo |
48 |
+END |
49 |
+} else { |
50 |
+ check_tree(<<END, "checking tree"); |
51 |
main::foo |
52 |
Fcntl::constant |
53 |
END |
54 |
+} |