Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / auto / Inline / read_inline_file.al
CommitLineData
86530b38
AT
1# NOTE: Derived from blib/lib/Inline.pm.
2# Changes made here will be lost when autosplit is run again.
3# See AutoSplit.pm.
4package Inline;
5
6#line 636 "blib/lib/Inline.pm (autosplit into blib/lib/auto/Inline/read_inline_file.al)"
7#==============================================================================
8# Get the source code from an Inline::Files filehandle
9#==============================================================================
10sub read_inline_file {
11 my $o = shift;
12 my ($lang, $pkg) = @{$o->{API}}{qw(language_id pkg)};
13 my $langfile = uc($lang);
14 croak M59_bad_inline_file($lang) unless $langfile =~ /^[A-Z]\w*$/;
15 croak M60_no_inline_files()
16 unless (defined $INC{File::Spec::Unix->catfile("Inline","Files.pm")} and
17 $Inline::Files::VERSION =~ /^\d\.\d\d$/ and
18 $Inline::Files::VERSION ge '0.51');
19 croak M61_not_parsed() unless $lang = Inline::Files::get_filename($pkg);
20 {
21 no strict 'refs';
22 local $/;
23 $Inline::FILE = \*{"${pkg}::$langfile"};
24# open $Inline::FILE;
25 $o->{API}{code} = <$Inline::FILE>;
26# close $Inline::FILE;
27 }
28}
29
30# end of Inline::read_inline_file
311;