Skip to content

Instantly share code, notes, and snippets.

@diegok
Created February 25, 2012 01:07
Show Gist options
  • Save diegok/1905030 to your computer and use it in GitHub Desktop.
Save diegok/1905030 to your computer and use it in GitHub Desktop.
sub set_config {
my $self = shift;
my $config = My::Config->new;
$self->app->log->debug( $config->test ); #yay
$self->helper( config => sub { $config } );
$self->log->debug( $self->config->test ); # Can't call method "test" on unblessed reference
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment