473,385 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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, 601 views)
Oct 12 '07 #1
5 7804
numberwhun
3,509 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

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

Similar topics

0
by: George Harig | last post by:
While building my deployment project I receive the following error Unable to build folder named "FOLDER_NAME". My projects compiles fine, the deployment project dose not. Are there any rules...
0
by: Michael R. Pierotti | last post by:
Has anyone seen this error before when trying to make the install on a program. ------ Starting pre-build validation for project 'HafaSMPPInstall' ------ WARNING: Unable to find dependency...
2
by: Carmit | last post by:
Hi, I'm trying to build a proxy for this webservice: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/EndTransactionLLSRQ.wsdl I'm getting the following error: Error: Unable to import...
3
by: DJTN | last post by:
I'm getting the following error when I try to compile my setup project in VS 2002. I have re-installed the .net framework 1.1 and it didnt solve the problem. WARNING: Unable to find dependency...
0
by: SteveS | last post by:
I am trying to build a web application MSI file in VS 2003. I have my project and all the files. I have another project which is my setup. Everytime I build the setup project, I get this: ...
0
by: Rich | last post by:
I have an ASP.NET application "Modeler" that I adapted from ibuyspy. I worked fine under ASP.NET 1.1 & Visual Studio 2003. I recently installed ASP.NET 2.0 & Visual Studio 2005 Pro. After...
4
by: Abubakar | last post by:
Hi, I'm using vs2k5 vc++ (native/unmanaged). I just took a separate copy of a project from source control (vss) and after fixing its dependencies build it and it builds fine. But when I try to...
3
by: annoir | last post by:
I am trying to create a stored procedure using the DB2 Connect Development Center. I am able to create the project, connect to the remote database on the mainframe and create the stored procedure....
3
by: =?Utf-8?B?TGV3aXMgTW90ZW4=?= | last post by:
Hello. We are having a problem here trying to compile C# applications. Only one developer has a problem where they attempt to compile the application and the compiler complains about being out of...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.