- add a
after_dispatch
hook. Somewhat like https://github.com/mozilla-bteam/bmo/blob/master/Bugzilla/App.pm#L115-L120, but probably outside thatif ($self->mode ne 'development'
on (so before line 108) $c->headers->snake_case_header
(see these docs for details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function timelines | |
set -l files | |
for input in $argv | |
set -l file (mktemp) | |
sort $input | uniq -c |awk '{print $2, $1}' | sort > $file | |
set -a files $file | |
end | |
set -l cleanup $files | |
while [ (count $files) -ge 2 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ > perl -MTest2::V0 -E 'is([1,2,3],[1,2,3,4])' | |
# Seeded srand with seed '20190208' from local date. | |
not ok 1 | |
# Failed test at -e line 1. | |
# +------+------------------+-------+ | |
# | PATH | GOT | CHECK | | |
# +------+------------------+-------+ | |
# | [3] | <DOES NOT EXIST> | 4 | | |
# +------+------------------+-------+ | |
# Tests were run but no plan was declared and done_testing() was not seen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Bugzilla::Test::Selenium; | |
use 5.10.1; | |
use Moo; | |
has 'driver_class' => (is => 'ro', default => 'Test::Selenium::Remote::Driver'); | |
has 'driver_args' => (is => 'ro', required => 1); | |
has 'driver' => ( | |
is => 'lazy', | |
handles => { | |
# $self->foo is $self->driver->bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ $bug->add_to_keywords({ name => 'relnote' }) | |
Took 0.00436711311340332 seconds. | |
$Bugzilla_Model_Result_Keyword1 = Bugzilla::Model::Result::Keyword=HASH(0x913bf30); | |
$ map { $_->name } $bug->keywords | |
Took 0.00398492813110352 seconds. | |
$VAR1 = 'regression'; | |
$VAR2 = 'relnote'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub bug_start_of_set_all { | |
my ($self, $args) = @_; | |
my $bug = $args->{bug}; | |
my $params = $args->{params}; | |
# reset to the component defaults if not supplied | |
if (exists $params->{assigned_to} | |
&& (!defined $params->{assigned_to} || $params->{assigned_to} eq '')) | |
{ | |
$params->{assigned_to} = $bug->component_obj->default_assignee->login; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub object_before_set { | |
my ($self, $args) = @_; | |
my ($object, $field) = @$args{qw(object field)}; | |
if ($field eq 'resolution' and $object->isa('Bugzilla::Bug')) { | |
# Store the old value so that end_of_set can check it. | |
$object->{'_oldbugmove_old_resolution'} = $object->resolution; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
after_dispatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Type | SVs | Bytes | |
SCALAR | 754245 | 58253206 | |
HASH | 25671 | 12042126 | |
GLOB | 59125 | 8641240 | |
ARRAY | 44766 | 7310016 | |
PAD | 24277 | 6350928 | |
PADNAMES | 24084 | 5916840 | |
CODE | 27955 | 3801880 | |
STASH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.10.1; | |
use Bugzilla; | |
use Storable qw(freeze); | |
Bugzilla->extensions; | |
sub main::cache_size { | |
my $rc = Bugzilla->request_cache; | |
my %total; | |
state $prev_total; | |
foreach (keys %$rc) { |