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