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

Greetings,

Why would this:

197 format STDOUT_TOP = 198 ==== Deleted Satellite profiles older than @#### days ===== 199 Satellite profile Last checkin 200 $argref->{days} 201 .

Produce this error:

Can't locate object method "Last" via package "checkin" (perhaps you forgot to load "checkin"?) at ./satrp line 199.

Neil Watson
watson-wilson.ca

Replies are listed 'Best First'.
Re: Can't locate object method in a format error
by MidLifeXis (Monsignor) on Jun 04, 2015 at 18:14 UTC

    It has been a while since I wrote a format, but try this, per perlform:

    format STDOUT_TOP = ==== Deleted Satellite profiles older than @#### days ===== $argref->{days} Satellite profile Last checkin .

    IIRC, You should alternate variable lines with format lines immediately follow each format line containing placeholders with the variables to be inserted.

    --MidLifeXis

      "IIRC, ..."

      You do recall correctly. The documentation you linked to has (my emphasis):

      "An argument line supplying values to plug into the previous picture line."

      -- Ken