Hi, After several attempts at using the PAR packager to package my modules i am facing some problems. Here are few details about what i am trying to do.

I have installed strawberry-perl-5.12.3.0 and i have downloaded few modules from CPAN which are present in my C:\strawberry\perl\site\lib directory.

I have few perl scripts which i have written based on the modules i have downloaded.

Now i have to package all my scripts and the modules those are present at C:\strawberry\perl\site\lib so i am creating a PAR file, until here everything works fine. I am using the below command to add my modules and scripts in to the PAR and all the modules are added fine and generate a file called 'a.par'.

pp -a C:\strawberry\perl\site\lib -B -p D:\ABD\PerlProjects\Sample\Balaji\Test.pl

Now inorder to test it i am using a fresh machine where i installed strawberry perl and wrote a small program to import these modules and check if it works. Below is my program. In the program i am using Win32::GuiTest which is part of my PAR file which i want to use.

#!usr/bin/perl use PAR 'a.par' use Win32::Process; use Win32::GuiTest; my $Processobj; Win32::Process::Create($ProcessObj, "C:\\ +Program Files\\ABD\\Application\\App.exe", ".", 0, NORMAL_PRIORITY_CLASS, "C:\\Program Files\\ABD\\Application") +|| die "Could not spawn process";
After this when i run the program i get the below error which i am not able to resolve. Microsoft Windows XP Version 5.1.2600 (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\buildrelease>d:

D:\>New.pl Can't locate Win32/GuiTest.pm in @INC (@INC contains: a.par CODE(0x9ef4b4) C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C: /strawberry/perl/lib . CODE(0x9d0764)) at D:\New.pl line 5. BEGIN failed--compilation aborted at D:\New.pl line 5.

Can anybody tell me whats wrong with my approach and correct me.

In reply to Importing modules from a par file fails. by balajinagaraju

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.