Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Cryptic error message

by Phemto (Acolyte)
on Oct 05, 2007 at 10:06 UTC ( [id://642878]=perlquestion: print w/replies, xml ) Need Help??

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

Ok, the message isn't crytic but the obvious solution isn't working. I'm getting "Ablation.pm did not return a true value..." All my attempts to RTFM point to "Put in a 1;" but I knew that as you can see in the code below (sans extraneous sub-verbage). This is my first foray into using inheritance. Could that be related?

Thanks

package Ablation; use Exporter; #use Tie::File::AsHash; use Math::Trig; use Image::Magick; use Lens; use Cloud; #This package actually maintains a list of all the spots fired during +the program #At the end, it can collate them into an image of the chip. $VERSION = 0.01; @ISA = qw(G_code1_25 Exporter); @EXPORT = qw(new Depth Remove Destroy); @EXPORT_OK = qw(); return 1; use lib "/Users/peterhowell/Documents/2007/Ablated_Waveguides/modules/ +"; use constant PI => 4 * atan2 1, 1; my $dir = "/Users/peterhowell/Library/Programing/Spots/"; my @apertures; #maintains a list of all the apertures that have bee +n used. my @spots; #catalogue of all the spots that have been laid down #create new spot data structure. Right now I'm assuming that the sub new {} #Linear motion without cutting sub G0 {} sub G1 {} #clockwise rotation sub G2 {} #anticlockwise rotation sub G3 {} sub Make_Lens {} #fire a single pulse at the given coordinates sub Pulse {} #Sets the modes of the laser (on, off) and (spacing/pulse) #This replaces L_ON and L_OFF #if called without a clear mode it simply reports the current mode sub Laser {} sub Spacing {} #Put in all the initial stuff sub Init {} sub Change_Aperture {} sub Home {} sub _place_pulse {} sub _place_line {} sub _place_circle {} sub _angledif {} #Shut down the module and clean up the memory space #but first save the image of the ablation sub Destroy {} 1;

Replies are listed 'Best First'.
Re: Ablation.pm did not return a true value
by svenXY (Deacon) on Oct 05, 2007 at 10:20 UTC
    Hi,
    constant suggests
    use constant PI => 4 * atan2(1, 1);
    whereas you have
    use constant PI => 4 * atan2 1, 1;
    . Could that be it?
    Regards,
    svenXY
      Nope, that didn't do it. I'm wondering if it's something outside the file that's causing it. You can't get much simpler than returning a positive value, but I can't get it to do it.
        What is the output if you simply run perl Ablation.pm
        Hi,
        well, then comment out one module call at a time and check which one does it.
        Regards,
        svenXY
Re: Cryptic error message
by bruceb3 (Pilgrim) on Oct 05, 2007 at 11:55 UTC
    Fifteen lines from the top, you have the line;
    return 1;

    Why?

      I was just desperately trying to get it to return a true value, so I put that in much closer to the top in hopes that would do it. It was a test that I forgot to take out again before posting. Thanks for catching it.

      Now... wouldn't you think  return 1; would mean that the module is returning "1". And last I knew 1 was a true value. My office-mate didn't sprout a goatee overnight, so I must not have woken up in mirror-world.

      Very confused.

        I created a dummy Cloud, Lens and G_code1_25 module in my current directory and removed the return 1; line (although from later testing I can say that it didn't make any difference) and your code works for me, atleast I don't get the same error.

        I think that you are finding a old version of the Ablation module. Run the following and see if the Ablation module is being found in the right spot.

        perl -MAblation -e 'use Data::Dumper; print Dumper \%INC'
Re: Ablation.pm did not return a true value
by jeanluca (Deacon) on Oct 05, 2007 at 10:19 UTC
    What exactly is the error you get? I get
    Can't locate Image/Magick.pm in @INC...
    but thats probably not the error you get :)

    LuCa

    UPDATE:did the content of the original post change? or did I miss
    "Ablation.pm did not return a true value..."
    If I missed that, I'm truly sorry for this post!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-13 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found