469,311 Members | 2,514 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,311 developers. It's quick & easy.

unable to run Build.pl

Hi,
I m very new to perl
I m running an API which have the Buil.pl
When Im compiling using perl Build.pl


I was getting error :

Can't locate Module/Build.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/li
b .) at Build.PL line 5.
BEGIN failed--compilation aborted at Build.PL line 5.

But searching net I got the Build.pm which is as follows:
package Module::Build;

Expand|Select|Wrap|Line Numbers
  1. # This module doesn't do much of anything itself, it inherits from the
  2. # modules that do the real work.  The only real thing it has to do is
  3. # figure out which OS-specific module to pull in.  Many of the
  4. # OS-specific modules don't do anything either - most of the work is
  5. # done in Module::Build::Base.
  6.  
  7. use strict;
  8. use File::Spec ();
  9. use File::Path ();
  10. use File::Basename ();
  11.  
  12. use Module::Build::Base;
  13.  
  14. use vars qw($VERSION @ISA);
  15. @ISA = qw(Module::Build::Base);
  16. $VERSION = '0.28';
  17. $VERSION = eval $VERSION;
  18.  
  19. # Okay, this is the brute-force method of finding out what kind of
  20. # platform we're on.  I don't know of a systematic way.  These values
  21. # came from the latest (bleadperl) perlport.pod.
  22.  
  23. my %OSTYPES = qw(
  24.          aix       Unix
  25.          bsdos     Unix
  26.          dgux      Unix
  27.          dynixptx  Unix
  28.          freebsd   Unix
  29.          linux     Unix
  30.          hpux      Unix
  31.          irix      Unix
  32.          darwin    Unix
  33.          machten   Unix
  34.          next      Unix
  35.          openbsd   Unix
  36.          netbsd    Unix
  37.          dec_osf   Unix
  38.          svr4      Unix
  39.          svr5      Unix
  40.          sco_sv    Unix
  41.          unicos    Unix
  42.          unicosmk  Unix
  43.          solaris   Unix
  44.          sunos     Unix
  45.          cygwin    Unix
  46.          os2       Unix
  47.  
  48.          dos       Windows
  49.          MSWin32   Windows
  50.  
  51.          os390     EBCDIC
  52.          os400     EBCDIC
  53.          posix-bc  EBCDIC
  54.          vmesa     EBCDIC
  55.  
  56.          MacOS     MacOS
  57.          VMS       VMS
  58.          VOS       VOS
  59.          riscos    RiscOS
  60.          amigaos   Amiga
  61.          mpeix     MPEiX
  62.         );
  63.  
  64. # Inserts the given module into the @ISA hierarchy between
  65. # Module::Build and its immediate parent
  66. sub _interpose_module {
  67.   my ($self, $mod) = @_;
  68.   eval "use $mod";
  69.   die $@ if $@;
  70.  
  71.   no strict 'refs';
  72.   my $top_class = $mod;
  73.   while (@{"${top_class}::ISA"}) {
  74.     last if ${"${top_class}::ISA"}[0] eq $ISA[0];
  75.     $top_class = ${"${top_class}::ISA"}[0];
  76.   }
  77.  
  78.   @{"${top_class}::ISA"} = @ISA;
  79.   @ISA = ($mod);
  80. }
  81.  
  82. if (grep {-e File::Spec->catfile($_, qw(Module Build Platform), $^O) . '.pm'} @INC) {
  83.   __PACKAGE__->_interpose_module("Module::Build::Platform::$^O");
  84.  
  85. } elsif (exists $OSTYPES{$^O}) {
  86.   __PACKAGE__->_interpose_module("Module::Build::Platform::$OSTYPES{$^O}");
  87.  
  88. } else {
  89.   warn "Unknown OS type '$^O' - using default settings\n";
  90. }
  91.  
  92. sub os_type { $OSTYPES{$^O} }
  93.  
  94. 1;
  95.  
  96. __END__
  97.  
I got the above code save in the file name Build.pm, in the folder C:\Perl\Module
After running the above : perl Build.pm

I got the following error :
Can't locate Module/Build/Base.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at C:/Perl/lib/Module/Build.pm line 14.
BEGIN failed--compilation aborted at C:/Perl/lib/Module/Build.pm line 14.
Compilation failed in require at Build.PL line 5.
BEGIN failed--compilation aborted at Build.PL line 5.

I was tickling with the code I commented the line :use Module::Build::Base;

Again I got the error

Can't locate Module/Build/Platform/Windows.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at (eval 4) line 2.
BEGIN failed--compilation aborted at (eval 4) line 2.
Compilation failed in require at Build.PL line 5.
BEGIN failed--compilation aborted at Build.PL line 5.

Please help me to able compile the Build.pm.

Thanks and regards

PS : Im attaching the file Build.pl (rename as Build.txt)which I m compiling
Attached Files
File Type: txt Build.txt (846 Bytes, 556 views)
Oct 12 '07 #1
5 7603
numberwhun
3,503 Expert Mod 2GB
Hi,
I m very new to perl
I m running an API which have the Buil.pl
When Im compiling using perl Build.pl


I was getting error :

Can't locate Module/Build.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/li
b .) at Build.PL line 5.
BEGIN failed--compilation aborted at Build.PL line 5.

But searching net I got the Build.pm which is as follows:
package Module::Build;

Expand|Select|Wrap|Line Numbers
  1. # This module doesn't do much of anything itself, it inherits from the
  2. # modules that do the real work.  The only real thing it has to do is
  3. # figure out which OS-specific module to pull in.  Many of the
  4. # OS-specific modules don't do anything either - most of the work is
  5. # done in Module::Build::Base.
  6.  
  7. use strict;
  8. use File::Spec ();
  9. use File::Path ();
  10. use File::Basename ();
  11.  
  12. use Module::Build::Base;
  13.  
  14. use vars qw($VERSION @ISA);
  15. @ISA = qw(Module::Build::Base);
  16. $VERSION = '0.28';
  17. $VERSION = eval $VERSION;
  18.  
  19. # Okay, this is the brute-force method of finding out what kind of
  20. # platform we're on.  I don't know of a systematic way.  These values
  21. # came from the latest (bleadperl) perlport.pod.
  22.  
  23. my %OSTYPES = qw(
  24.          aix       Unix
  25.          bsdos     Unix
  26.          dgux      Unix
  27.          dynixptx  Unix
  28.          freebsd   Unix
  29.          linux     Unix
  30.          hpux      Unix
  31.          irix      Unix
  32.          darwin    Unix
  33.          machten   Unix
  34.          next      Unix
  35.          openbsd   Unix
  36.          netbsd    Unix
  37.          dec_osf   Unix
  38.          svr4      Unix
  39.          svr5      Unix
  40.          sco_sv    Unix
  41.          unicos    Unix
  42.          unicosmk  Unix
  43.          solaris   Unix
  44.          sunos     Unix
  45.          cygwin    Unix
  46.          os2       Unix
  47.  
  48.          dos       Windows
  49.          MSWin32   Windows
  50.  
  51.          os390     EBCDIC
  52.          os400     EBCDIC
  53.          posix-bc  EBCDIC
  54.          vmesa     EBCDIC
  55.  
  56.          MacOS     MacOS
  57.          VMS       VMS
  58.          VOS       VOS
  59.          riscos    RiscOS
  60.          amigaos   Amiga
  61.          mpeix     MPEiX
  62.         );
  63.  
  64. # Inserts the given module into the @ISA hierarchy between
  65. # Module::Build and its immediate parent
  66. sub _interpose_module {
  67.   my ($self, $mod) = @_;
  68.   eval "use $mod";
  69.   die $@ if $@;
  70.  
  71.   no strict 'refs';
  72.   my $top_class = $mod;
  73.   while (@{"${top_class}::ISA"}) {
  74.     last if ${"${top_class}::ISA"}[0] eq $ISA[0];
  75.     $top_class = ${"${top_class}::ISA"}[0];
  76.   }
  77.  
  78.   @{"${top_class}::ISA"} = @ISA;
  79.   @ISA = ($mod);
  80. }
  81.  
  82. if (grep {-e File::Spec->catfile($_, qw(Module Build Platform), $^O) . '.pm'} @INC) {
  83.   __PACKAGE__->_interpose_module("Module::Build::Platform::$^O");
  84.  
  85. } elsif (exists $OSTYPES{$^O}) {
  86.   __PACKAGE__->_interpose_module("Module::Build::Platform::$OSTYPES{$^O}");
  87.  
  88. } else {
  89.   warn "Unknown OS type '$^O' - using default settings\n";
  90. }
  91.  
  92. sub os_type { $OSTYPES{$^O} }
  93.  
  94. 1;
  95.  
  96. __END__
  97.  
I got the above code save in the file name Build.pm, in the folder C:\Perl\Module
After running the above : perl Build.pm

I got the following error :
Can't locate Module/Build/Base.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at C:/Perl/lib/Module/Build.pm line 14.
BEGIN failed--compilation aborted at C:/Perl/lib/Module/Build.pm line 14.
Compilation failed in require at Build.PL line 5.
BEGIN failed--compilation aborted at Build.PL line 5.

I was tickling with the code I commented the line :use Module::Build::Base;

Again I got the error

Can't locate Module/Build/Platform/Windows.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at (eval 4) line 2.
BEGIN failed--compilation aborted at (eval 4) line 2.
Compilation failed in require at Build.PL line 5.
BEGIN failed--compilation aborted at Build.PL line 5.

Please help me to able compile the Build.pm.

Thanks and regards

PS : Im attaching the file Build.pl (rename as Build.txt)which I m compiling
First, anytime you include code in a post to the forum, you should place \code] [/code] tags around it so the Moderators like myself do not have to clean up after you.

Second, I don't think you can just copy that module as you saw it like that. Try using ppm (which comes with Active State Perl, to install the Build module. You will be much more successful that way.

Regards,

Jeff
Oct 12 '07 #2
First, anytime you include code in a post to the forum, you should place \code] [/code] tags around it so the Moderators like myself do not have to clean up after you.

Second, I don't think you can just copy that module as you saw it like that. Try using ppm (which comes with Active State Perl, to install the Build module. You will be much more successful that way.

Regards,

Jeff
First Im sorry for the inconvenience caused.

I have run ppm as per you said
But it is giving the following error
Downloading ActiveState Package Repository packlist ... failed 500 Can't connect to ppm4.activestate.com:80 (Bad hostname 'ppm4.activestate.com')

I try to find build module
But I m not able to find it
even there is link given in the PPM help :
http://ppm.activestate.com/PPMPackag...x-builds-only/
But I was not able to get the where is the Build module.
Is there any way to find in the ppm to install a particular module?

Thanks and regards
PS : I m using windows xp and Perl v 5.8.8 (ActiveState)
Oct 13 '07 #3
KevinADC
4,059 Expert 2GB
can you intall any modules with ppm? Sometimes a firewall or other third party software prevents ppm from connecting to the internet. Turn off any firewall you might be running and try again.
Oct 13 '07 #4
i think problem is with the module unavailable.

try once to install this module

ppm install Module::Build



and then u run the same.
Oct 13 '07 #5
Hi,
I have got the module from the below link

module build

I have install from it

Thanks and regards
Oct 13 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by George Harig | last post: by
4 posts views Thread by Abubakar | last post: by
3 posts views Thread by annoir | last post: by
3 posts views Thread by =?Utf-8?B?TGV3aXMgTW90ZW4=?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.