Thread Bitte um Hilfe bei bless Fehler (39 answers)
Opened by bianca at 2019-09-28 17:06

bianca
 2019-09-28 17:06
#190562 #190562
User since
2009-09-13
6977 Artikel
BenutzerIn

user image
Script:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
use strict;
use warnings;

my %in_out = (
    foo => 'bar',
);

$in_out{foot}{bart} = sub {
    return "subsub";
};

my %test2 = (
    insub   => sub {
        my ($get2) = @_;
        my $resp = $get2->{foot}->bart();
        say $resp;
    },
);

$test2{insub}->(\%in_out);


Frage: was bedeutet jetzt hier genau der Fehler Can't call method "bart" on unblessed reference at test_bless.pl line 16. und wie behebe ich ihn, ohne die Syntax in $test2{insub} zu ändern?
Danke!
10 print "Hallo"
20 goto 10

View full thread Bitte um Hilfe bei bless Fehler