Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^7: Problem in @INC using PAR::Packer on Windows

by Anonymous Monk
on Nov 19, 2009 at 15:05 UTC ( #808170=note: print w/replies, xml ) Need Help??


in reply to Re^6: Problem in @INC using PAR::Packer on Windows
in thread Problem in @INC using PAR::Packer on Windows

First 3 lines leads me to believe you could use a code review
#!perl push @INC,"/usr/lib/perl5"; #use strict;
Eeew, you're doing it wrong :D I reccomend
#!perl use lib '/usr/lib/perl5'; use App::ns2html; App::ns2html->run();
A re-usability principle your exit button should close MainWindow, not call perl's exit function.

update: What is this?

system("> ../tmp/rules.tmp"); system("> ../tmp/routes.tmp"); system("> ../tmp/routes.tmp");
Please see perlport

Replies are listed 'Best First'.
Re^8: Problem in @INC using PAR::Packer on Windows
by rodrigo.pace.barros (Initiate) on Nov 23, 2009 at 16:38 UTC
    Hi.

    The codes 'system("> ../tmp/<filename>.tmp");' are related to some temporary files my script uses. This only creates empty files.

    I tried to use 'use lib "subs"' on my code, but the problem persists. All my subs are located inside my "subs" directory. And, when I put it on @INC via 'use lib', the problem occurs again:

    ===
    D:\documents and settings\r330293\Desktop\ns2html-0.4.6-win32\bin>ns2h +tml.exe Can't locate subs\AddrCreator.pl in @INC (@INC contains: CODE(0x130067 +4) CODE(0x115f914) CODE(0x115fc64)) at script/ns2html.pl line 31.
    ===

    Ive not created any .pm module. So, I think using ns2html.pm is not a quick solution for me now.

    I think my program dies just on its beginning, on this track of code:

    ===
    #!perl ###################################################################### +#### # NS2HTML - The Netscreen to HTML file converter ###################################################################### +#### # Copyright (C) by # - 2007: Rodrigo Pace de Barros <rodrigo.pace.barros@gmail.com> # # This program is free software; you can redistribute it and/or modi +fy # it under the terms of the GNU General Public License as published +by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # ###################################################################### +#### # # File: ns2html.pl # is a part of NS2HTML # ################# # use lib "subs"; # use Tk; use Tk::LabFrame; use Getopt::Std; use encoding 'latin-1'; use File::Basename; use Tk::BrowseEntry; use File::Copy::Recursive; # require 'subs\\AddrCreator.pl'; require 'subs\\CreateIndex.pl'; require 'subs\\IfCreator.pl'; require 'subs\\ReadConf.pl'; require 'subs\\RouteCreator.pl'; require 'subs\\RuleCreator.pl'; require 'subs\\subs.pl'; require 'subs\\SvcCreator.pl'; require 'subs\\Log.pl';
    ===

    Thanks again!

    Rodrigo

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://808170]
help
Chatterbox?
[ambrus]: Discipulus: oh sure. the input data has different filenames every time I get them.
[ambrus]: the directory structure may be 1, 2, or 3 deep, it may have spaces in the filename or not, it has dates in various format, different keywords for the same meanings, and the dates and other keywords are assembled in various ways.
[Discipulus]: no ambrus by specification i mean for example license per core instead of per socket, so fields are different

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2017-03-29 12:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (351 votes). Check out past polls.