File: bytes.pm

package info (click to toggle)
perl 5.8.4-8sarge6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 58,128 kB
  • ctags: 31,422
  • sloc: perl: 224,262; ansic: 155,398; sh: 32,253; pascal: 7,747; lisp: 6,121; makefile: 2,341; cpp: 2,035; yacc: 1,019; java: 23
file content (39 lines) | stat: -rw-r--r-- 769 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package ExtUtils::MakeMaker::bytes;

use vars qw($VERSION);
$VERSION = 0.01;

my $Have_Bytes = eval q{require bytes; 1;};

sub import {
    return unless $Have_Bytes;

    shift;
    unshift @_, 'bytes';

    goto &bytes::import;
}

1;


=head1 NAME

ExtUtils::MakeMaker::bytes - Version agnostic bytes.pm

=head1 SYNOPSIS

  use just like bytes.pm

=head1 DESCRIPTION

bytes.pm was introduced with 5.6.  This means any code which has 'use
bytes' in it won't even compile on 5.5.X.  Since bytes is a lexical
pragma and must be used at compile time we can't simply wrap it in
a BEGIN { eval 'use bytes' } block.

ExtUtils::MakeMaker::bytes is just a very thin wrapper around bytes
which works just like it when bytes.pm exists and everywhere else it
does nothing.

=cut