Commit | Line | Data |
2530b651 |
1 | package ExtUtils::MakeMaker::bytes; |
2 | |
1e65eb70 |
3 | use strict; |
4 | |
2530b651 |
5 | use vars qw($VERSION); |
6d6be53e |
6 | $VERSION = 6.42; |
2530b651 |
7 | |
8 | my $Have_Bytes = eval q{require bytes; 1;}; |
9 | |
10 | sub import { |
11 | return unless $Have_Bytes; |
12 | |
13 | shift; |
14 | unshift @_, 'bytes'; |
15 | |
16 | goto &bytes::import; |
17 | } |
18 | |
19 | 1; |
20 | |
21 | |
22 | =head1 NAME |
23 | |
a7d1454b |
24 | ExtUtils::MakeMaker::bytes - Version-agnostic bytes.pm |
2530b651 |
25 | |
26 | =head1 SYNOPSIS |
27 | |
28 | use just like bytes.pm |
29 | |
30 | =head1 DESCRIPTION |
31 | |
32 | bytes.pm was introduced with 5.6. This means any code which has 'use |
33 | bytes' in it won't even compile on 5.5.X. Since bytes is a lexical |
34 | pragma and must be used at compile time we can't simply wrap it in |
35 | a BEGIN { eval 'use bytes' } block. |
36 | |
37 | ExtUtils::MakeMaker::bytes is just a very thin wrapper around bytes |
38 | which works just like it when bytes.pm exists and everywhere else it |
39 | does nothing. |
40 | |
41 | =cut |