~mkanat/bugzilla-traceparser/trunk

« back to all changes in this revision

Viewing changes to rehash-traces.pl

  • Committer: Max Kanat-Alexander
  • Date: 2010-02-08 03:40:24 UTC
  • Revision ID: mkanat@bugzilla.org-20100208034024-2jr17lgakmfuls85
Convert extension code to using the 3.6 extension format.
Currently compiles and passes checksetup.pl, but hasn't been fully tested.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
use strict;
4
4
use warnings;
5
 
use lib qw(. lib extensions/traceparser/lib);
 
5
use lib qw(. lib);
6
6
use Bugzilla;
 
7
BEGIN { Bugzilla->extensions(); }
7
8
use Bugzilla::Install::Util qw(indicate_progress);
8
 
use TraceParser::Trace;
 
9
use Bugzilla::Extension::TraceParser::Trace;
9
10
 
10
11
my $dbh = Bugzilla->dbh;
11
12
 
22
23
my @traces;
23
24
while (my ($id, $text) = $sth->fetchrow_array) {
24
25
    $count++;
25
 
    my $trace = TraceParser::Trace->parse_from_text($text);
 
26
    my $trace = Bugzilla::Extension::TraceParser::Trace->parse_from_text($text);
26
27
    indicate_progress({ current => $count, total => $total, every => 10 });
27
28
    $trace->{id} = $id;
28
29
    push(@traces, $trace);