Skip to content

Commit

Permalink
Parametrise the summary url for easier testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rafl authored and oalders committed Apr 1, 2012
1 parent 421f631 commit dca6178
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/MetaCPAN/Script/Tickets.pm
Expand Up @@ -10,7 +10,11 @@ use namespace::autoclean;

with 'MooseX::Getopt', 'MetaCPAN::Role::Common';

my $rt_summary_url = 'https://rt.cpan.org/Public/bugs-per-dist.tsv';
has rt_summary_url => (
is => 'ro',
required => 1,
default => 'https://rt.cpan.org/Public/bugs-per-dist.tsv',
);

sub run {
my ($self) = @_;
Expand All @@ -23,7 +27,7 @@ sub retrieve_bug_summary {
my ($self) = @_;

my $ua = LWP::UserAgent->new;
my $resp = $ua->request(GET $rt_summary_url);
my $resp = $ua->request(GET $self->rt_summary_url);

confess $resp->reason unless $resp->is_success;

Expand Down

0 comments on commit dca6178

Please sign in to comment.