Camelcade/Devel-Camelcadedb

Use of uninitialized value within @lines in join or string at /usr/local/share/perl5/Devel/Camelcadedb.pm line 351.

b1zzu opened this issue · 0 comments

b1zzu commented

When trying to debug this remote file:
Manager.pm.txt
the debugger return this file:
Manager.out.txt

In the output file a lot of line are missing and for this reason breakpoints and steps are not mapped corrected by the IDEA.

On the server side the debugger is showing me this error:
Use of uninitialized value within @lines in join or string at /usr/local/share/perl5/Devel/Camelcadedb.pm line 351.

For now i have found a workaround. I have add this line before the line 351 of the file Camelcadedb.pm

sub _get_file_source_by_file_id
{
    my ($file_id) = @_;
    $_source_been_sent{$file_id} = 1;
    {
        no strict 'refs';
        _report "Getting source of main::_<$file_id" if $_dev_mode;
        my @lines = @{"main::_<$file_id"};
        @lines = map { !$_ ? "\n" : $_ } @lines;
        shift @lines;
        return _to_utf8( join '', @lines );
    }
}
@lines = map { !$_ ? "\n" : $_ } @lines;

but this only return a file with the correct line number but in the output file there are still some that are displayed as empty line but their aren't.