develooper Front page | perl.perl6.users | Postings from February 2019


Thread Next
ToddAndMargo via perl6-users
February 28, 2019 11:46
Message ID:
Hi All,

I am trying to place .payload into a variable `my $Payload = .payload;`

    # Reference:
    my $NotifyStr;
    my $Payload = .payload;

    default {
       # $*ERR.say: .payload;
       PrintRedErr( "$Payload\n" );
       $NotifyStr = $Payload;
       for .backtrace.reverse {
          next if .file.starts-with('SETTING::');
          next unless .subname;
          # $*ERR.say: "  in block {.subname} at {.file} line {.line}";
          PrintRedErr( "  in block {.subname} at {.file} line {.line}\n" );
    RunNoShell( "notify-send -u critical -t 0 -i \"$AlarmJpg\" \"CATCH 
Trap \" \"$NotifyStr\"" );

But keep pulling the following error:

      No such method 'payload' for invocant of type
      'X::TypeCheck::Assignment' in block <unit>
      at ./GetUpdates.pl6 line 60

Line 60 is `my $Payload = .payload;`

What am I doing wrong?

Many thanks,

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About