Last change
on this file since 18851 was 15894, checked in by mdewsnip, 16 years ago |
Added "use strict" to the files missing it.
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
800 bytes
|
Rev | Line | |
---|
[8069] | 1 | # Wrapper that ensures the right version of XML::Parser is loaded given
|
---|
| 2 | # the version of Perl being used. Need to distinguish between Perl 5.6 and
|
---|
| 3 | # Perl 5.8
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | sub BEGIN {
|
---|
| 7 | my $perl_dir;
|
---|
| 8 |
|
---|
| 9 | # Note: $] encodes the version number of perl
|
---|
| 10 | if ($]>5.008) {
|
---|
| 11 | # perl 5.8.1 or above
|
---|
| 12 | $perl_dir = "perl-5.8";
|
---|
| 13 | }
|
---|
| 14 | elsif ($]<5.008) {
|
---|
| 15 | # assume perl 5.6
|
---|
| 16 | $perl_dir = "perl-5.6";
|
---|
| 17 | }
|
---|
| 18 | else {
|
---|
| 19 | print STDERR "Warning: Perl 5.8.0 is not a maintained release.\n";
|
---|
| 20 | print STDERR " Please upgrade to a newer version of Perl.\n";
|
---|
| 21 | $perl_dir = "perl-5.8";
|
---|
| 22 | }
|
---|
| 23 |
|
---|
[8087] | 24 | if ($ENV{'GSDLOS'} !~ /^windows$/i) {
|
---|
[9239] | 25 | # Use push to put this on the end, so an existing XML::Parser will be used by default
|
---|
| 26 | push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir");
|
---|
[8087] | 27 | }
|
---|
[8069] | 28 | }
|
---|
| 29 |
|
---|
| 30 | use XML::Parser;
|
---|
[15894] | 31 | use strict;
|
---|
[8069] | 32 |
|
---|
| 33 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.