I am a beginner in Perl.I was trying to convert some Perl scripts into Perl exe files using pp utility (Ex:pp -o test.exe test.pl). I have succeeded in few exe files creation.Recently I packed a script into exe file which is throwing an error

DBD::AnyData::st execute failed: Execution ERROR: Error Opening File-Parser: Can't Locate AnyData/Format/Pipe.pm in @INC <@INC contains......

I have installed these modules in my system.The Script is running fine as expected but when packed into exe file,it is not working. Please find below my Script
use DBI; use strict; use DBI::DBD::SqlEngine; use AnyData; use DBD::AnyData; unlink "QueryResult.txt"; print "\nEnter the input file name with path info : \n"; chomp( my $dir = <STDIN>); my ($directory,$file_name); if($dir=~m/(.*\\)([^\\]+)$/is) { $directory=$1; $file_name=$2; $file_name=~s/\.[^>]*$//igs; } $dir =~ s!\\!\/!igs; print "\nEnter the file delimiter(Pipe,CSV,Tab) : \n"; chomp( my $deli = <STDIN>); print "\nDo you want to count the number of lines in the input file(1= +Yes,0=No) \n"; chomp( my $depend_flag = <STDIN>); if($depend_flag==1) { open(IN,"$dir"); my @str = <IN>; close(IN); my $lines=scalar(@str); print "The number of lines in $dir is $lines.\n"; } query: print "\nEnter the query to execute : \n"; chomp( my $query = <STDIN>); my $dbh = DBI->connect('dbi:AnyData:'); $dbh->func( "$file_name", "$deli", "$dir",'ad_catalog'); my $sth = $dbh->prepare("$query"); $sth->execute(); print "\n"; while (my $row = $sth->fetch) { print "@$row\n"; open(APPEND,">>$directory/QueryResult.txt"); print APPEND "@$row\n"; close(APPEND); } print "\nDo you want to execute another query(1=Yes,0=No) \n"; chomp( my $flag = <STDIN>); if($flag==1) { goto query; } else { exit; }
My doubt was whether Module::ScanDeps. module in pp utility is listing all the dependent modules in Anydata.pm to pack. I tried adding this module also while packing(Ex: pp -o test.exe -M AnyData test.pl).But it failed

Please help me on this. Thanks in Advance.


In reply to Help needed in Perl exe creation by Allwin

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.