Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Can't locate Object/MultiType.pm Error

by Vijay81 (Acolyte)
on Nov 28, 2012 at 11:02 UTC ( [id://1006007]=perlquestion: print w/replies, xml ) Need Help??

Vijay81 has asked for the wisdom of the Perl Monks concerning the following question:

Hi All Am new to perl and i have install ActivePerl in my windows Xp 32 bit system. Am trying to run a small script which create a xml file using use XML::Smart module. when ever i tried to run the script i get the below error, not sure where am making mistake. Any help please Error :

C:\QA\Projects\Perl>perl QAServerSetup.pl Can't locate Object/MultiType.pm in @INC (@INC contains: C:\Perl\lib\P +LJava-0.04 C:/Perl/site/lib C:/Perl/lib .) at C:/Perl/lib/XML/Smart.pm line 18. BEGIN failed--compilation aborted at C:/Perl/lib/XML/Smart.pm line 18. Compilation failed in require at QAServerSetup.pl line 3. BEGIN failed--compilation aborted at QAServerSetup.pl line 3.
Script file content is :
#!/bin/perl -w use lib 'C:\Perl\lib\PLJava-0.04'; use XML::Smart; ## Create a null XML object: my $XML = XML::Smart->new() ; ## Add a xml server to the list: $XML->{configuration} = { version => '0.7.1.136' , savepassword => 'True' , } ; $XML->save('newfile.xml') ;

Also, i need to know how to install the perl modules using PPM window and if any of the modules installed manually(tar files,unzipped) then where we need to put those module files into(location) ??? Thanks, V

Replies are listed 'Best First'.
Re: Can't locate Object/MultiType.pm Error
by marto (Cardinal) on Nov 28, 2012 at 11:10 UTC

    You haven't installed XML::Smart correctly, it's dependencies are not satisfied, Object::MultiType.

    You don't mention how you installed XML::Smart, if you think downloading the tar files and copying files to places is a good idea, it isn't.

    To install using ppm from the command prompt:

    ppm Module::Name

    To install using cpan from the command prompt:

    cpan Module::Name

    Either method will install the module and it's dependencies. If you use the cpan method consider installing MinGW and the build tools for your version of ActiveState Perl by:

    ppm MinGW

    Note also the XML::Smart module is quite old and has several reported bugs you may want to make yourself aware of. I'd never heard of it before you mentioned it. Perhaps one of the more modern, supported XML modules would suffice.

    Update: See also PerlMonks for the Absolute Beginner, since you posted in the wrong section of the forum.

      Thank you All. It worked.
Re: Can't locate Object/MultiType.pm Error
by tobyink (Canon) on Nov 28, 2012 at 11:08 UTC

    You need to install Object::MultiType.

    If you want to install a module manually, uncompress it, then at the command line, cd to the uncompressed directory and run the following four commands:

    perl Makefile.PL make make test make install

    Don't try to faff around copying modules to lib dirs by hand. Many packages need to build or configure stuff at install time, so you need to run make.

    (Or use PPM, which does all that for you.)

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re: Can't locate Object/MultiType.pm Error
by choroba (Cardinal) on Nov 28, 2012 at 11:08 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1006007]
Approved by tobyink
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-24 18:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found