Skip to content

Instantly share code, notes, and snippets.

@wcravens
Forked from diegok/gist:1905030
Created February 25, 2012 12:05
Show Gist options
  • Save wcravens/1908098 to your computer and use it in GitHub Desktop.
Save wcravens/1908098 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