Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: aborted due Compilation error (!!??)

by franky (Initiate)
on May 04, 2012 at 21:40 UTC ( [id://968990]=note: print w/replies, xml ) Need Help??


in reply to Re: aborted due Compilation error (!!??)
in thread aborted due Compilation error (!!??)

Hi Mr NetWallah, also i Applied on line 16 your suggestion, I changed  use strict ;      to :     use no strict subs; And i got a long message : frankyy@localhost myprog$ perl -w myperl60f.pl Can't locate no.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.10.1 /usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.1 /usr/lib/perl5/5.10.1/i386-linux-thread-multi /usr/lib/perl5/5.10.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl .) at myperl60f.pl line 16. BEGIN failed--compilation aborted at myperl60f.pl line 16. franky@localhost myprog$ - P.S I used first Mr chromatic Sugesttion, then yours,and finally i applied both suggestion at once

Replies are listed 'Best First'.
Re^3: aborted due Compilation error (!!??)
by NetWallah (Canon) on May 05, 2012 at 02:27 UTC
    My suggestion was "no strict "subs"" - it id not include the word "use".

    If you want to disable "use strict", simply comment it out at the top of the code. (Insert "#" as the first character (without the quotes))

    Also - it would help readers if you formatted your post using HTML paragraph markers: <p> and/or <br/>

                 I hope life isn't a big joke, because I don't get it.
                       -SNL

      Hi Mr NetWallah,

      I tryed the sugestion with out "use", and when i called the Program didn't work, no action, cursor went to next line.

        updated/redacted
        Ok - good - that means your program did not post any errors.

        By that definition, it completed successfully.

        Now - if you are saying it did not do what you expected it to do, we need 2 things:
        * Your expectations
        * The code - We would prefer a minimal, but sufficient snippet of the code that demonstrates the problem

        Pleae read up on how to use 'readmore" and "code" tags, before posting large amounts of code.

        I did some tests, and found I was mistaken in the belief that "no subs" would allow undeclared subroutines to be called.

        Please ignore my suggestion for "no subs", and do one of the following:

        • Follow chromatic's suggestion - add Parens after the sub name, when calling
        • pre-declare the sub by using "sub SubName{};"
        The best way to approach this is to fix the errors one at a time, until the program runs clean.

                     I hope life isn't a big joke, because I don't get it.
                           -SNL

      Hi Mr NetWallah,

      Question:: which perl cmd argument can i used to identify if "myprog.pl" need perl repository or "missing" package?

        Look for "use <PackageName>;" statements - this is usually at the top of the code.

        But, since you indicated in the previous post that nothing was displayed by the program, it indicates that perl did NOT find any missing components (it would have complained if it did).

                     I hope life isn't a big joke, because I don't get it.
                           -SNL

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found