Greetings,
I must have missed something obvious, but I don't know what it is.
Consider this helper and its later use:
# ...
use Log::Log4perl;
use DBI;
sub startup
{
my $self = shift;
# ....
$self->helper( logger => sub
{
$self = shift;
Log::Log4perl::init( 'DeltaR_logging.conf' )
or die 'Cannot open [DeltaR_logging.conf]';
my $logger = Log::Log4perl->get_logger( $0 );
return $logger;
});
# ... and later:
# Now use the logger helper
$self->logger->info( 'Starting' ); # line 85
$self->defaults( small_title => '' ); # line 86
Running the app returns this error:
Can't locate object method "defaults" via package "Mojolicious::Controller" at
lib/DeltaR.pm line 86
--
Neil Watson
Linux/UNIX Consultant
http://watson-wilson.ca
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.