1

I didn't know what I do wrong. When I debug my perl script, it was terminated. Place where scipr is terminated is completely normal return from the function:

sub new {

    my $self = shift;
    $self = {};
    bless $self;

    #instance of  "base" class Features.pm
    $self->{"base"} = Features->new();

    my @features = ();
    $self->{"features"} = \@features;

    return $self; # <== here is script terminated
}

Right before terminated it goes to Carp module to function longmess I put here only preview of my code, because it is huge project. Only to see how the ordinary code it is, where it fail.

When I "remove" the module, which leads to termanation, from project and run this module separately, it is OK. Thus error will be somewhere else.

enter image description here (this error happend in different places in code, but only in return command) I use perl 5.16, Eclipse and Epic and my project located in c:\Perl\site\lib\

Please help me. Thank you

EDIT

Problem occurs only when I run program in debug mode in eclipse. When I run it without debuging

stepan
  • 39
  • 4
  • 2
    The link to your screenshot is broken. Please don't include screenshots of code or error messages, but instead provide them as text in the question body. You can [edit] your question and change that. You should also include a bit more of that program you wrote. If I copy and run your code snippet, it won't do anything because it's just a function that's not invoked anywhere. And we don't have Features either. Without the full thing, we cannot reproduce your problem and thus can't help. – simbabque Oct 14 '16 at 09:10
  • I don't think this is about the `return`. Does this problem also occur when you run your program without a debugger? Or with the command line debugger (just run it with `perl -d foo.pl`)? I believe this is Eclipse getting confused with your file system. – simbabque Oct 14 '16 at 15:45
  • Problem occurs only when I run program in debug mode in eclipse. When I run it without debuging OR simply from console OR with `perl -d foo.pl` everything is Ok. So what I shoul do? What do you mean by "Eclipse getting confused with your file system"? – stepan Oct 14 '16 at 16:10
  • Have you read the error messages down in the bottom left pane? It complains that it doesn't like some paths. I have no clue what that means, but it sounds like it's confused there. On the other hand, it opened the right file, didn't it? – simbabque Oct 14 '16 at 16:14

0 Answers0