Thanks for sharing your code.
Does it still work when you add use strict; use warnings; ?
From my point I see 2 problems in this line {$LogLine = '', $app = shift}; (and similar lines further on). Inserting key/values to a hash is done via the => operator (known as fat comma) or just a plain comma. You use assignment operator =. You escaped a "compilation" error because you use perl-variables as your keys. So the line my $self = {$LogLine = '', $app = shift}; assigns the empty string to $LogLine but does not insert a key named $LogLine into the hash. Perhaps you wanted this?: my $self = {'LogLine' => '', 'app' => shift}; and access it using: $self->{'LogLine'}. The single quotes are superfluous but I am using it just to make a point and to show you that using them will allow you to have a key literally named '$LogLine' but I suspect this is not what you want. So, first use use strict; use warnings; in your package and then I guess you want to replace all $LogLine with 'LogLine' or just LogLine
In reply to Re^3: Logging to web page with Mojolicious and strict
by bliako
in thread Logging to web page with Mojolicious and strict
by TieUpYourCamel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |