CrashTest.pl
changeset 24 b69b7aa98a1d
parent 23 e621317229f7
child 29 006e82a1bcd0
equal deleted inserted replaced
23:e621317229f7 24:b69b7aa98a1d
    23 my @valid_params = qw/Add-ons Distributor ProductName ReleaseChannel StartupTime UserID Version BuildID CrashTime Comments/;
    23 my @valid_params = qw/Add-ons Distributor ProductName ReleaseChannel StartupTime UserID Version BuildID CrashTime Comments/;
    24 my $config = plugin 'Config';
    24 my $config = plugin 'Config';
    25 
    25 
    26 app->attr(storage => sub {
    26 app->attr(storage => sub {
    27     my $self = shift;
    27     my $self = shift;
    28     eval "require $config->{Storage}->{Type}";
    28     eval "require $config->{Storage}->{Type}" or die "Loading module failed $@";
    29     return $config->{Storage}->{Type}->new($config->{Storage});
    29     return $config->{Storage}->{Type}->new($config->{Storage});
    30 });
    30 });
    31 
    31 
    32 app->attr(decode_queue => sub {
    32 app->attr(decode_queue => sub {
    33     my $self = shift;
    33     my $self = shift;
   111 };
   111 };
   112 
   112 
   113 app->secrets([
   113 app->secrets([
   114     'My secret passphrase here'
   114     'My secret passphrase here'
   115 ]);
   115 ]);
       
   116 
       
   117 push @{app->commands->namespaces}, 'CrashTest::Commands';
   116 app->start;
   118 app->start;