[Rt-commit] r5478 - in Test-Chimps:
branches/categories-rework/lib/Test/Chimps
zev at bestpractical.com
zev at bestpractical.com
Tue Jun 27 19:29:47 EDT 2006
Author: zev
Date: Tue Jun 27 19:29:46 2006
New Revision: 5478
Modified:
Test-Chimps/ (props changed)
Test-Chimps/branches/categories-rework/lib/Test/Chimps/Client.pm
Test-Chimps/branches/categories-rework/lib/Test/Chimps/Report.pm
Test-Chimps/branches/categories-rework/lib/Test/Chimps/Server.pm
Log:
r9751 at galvatron: zev | 2006-06-26 21:34:52 -0400
* perltidy
Modified: Test-Chimps/branches/categories-rework/lib/Test/Chimps/Client.pm
==============================================================================
--- Test-Chimps/branches/categories-rework/lib/Test/Chimps/Client.pm (original)
+++ Test-Chimps/branches/categories-rework/lib/Test/Chimps/Client.pm Tue Jun 27 19:29:46 2006
@@ -88,13 +88,15 @@
sub _init {
my $self = shift;
- validate_with(params => \@_,
- spec =>
- { reports =>
- { type => ARRAYREF },
- server => 1,
- compress => 0},
- called => 'The Test::Chimps::Client constructor');
+ validate_with(
+ params => \@_,
+ called => 'The Test::Chimps::Client constructor'
+ spec => {
+ reports => { type => ARRAYREF },
+ server => 1,
+ compress => 0
+ },
+ );
my %args = @_;
$self->{reports} = $args{reports};
Modified: Test-Chimps/branches/categories-rework/lib/Test/Chimps/Report.pm
==============================================================================
--- Test-Chimps/branches/categories-rework/lib/Test/Chimps/Report.pm (original)
+++ Test-Chimps/branches/categories-rework/lib/Test/Chimps/Report.pm Tue Jun 27 19:29:46 2006
@@ -83,16 +83,18 @@
sub _init {
my $self = shift;
- validate_with(params => \@_,
- spec =>
- { model =>
- {
- isa => 'Test::TAP::Model'},
- report_text => 0,
- report_variables =>
- { optional => 1,
- type => HASHREF } },
- called => 'The Test::Chimps::Report constructor');
+ validate_with(
+ params => \@_,
+ called => 'The Test::Chimps::Report constructor'
+ spec => {
+ model => { isa => 'Test::TAP::Model' },
+ report_text => 0,
+ report_variables => {
+ optional => 1,
+ type => HASHREF
+ }
+ },
+ );
my %args = @_;
Modified: Test-Chimps/branches/categories-rework/lib/Test/Chimps/Server.pm
==============================================================================
--- Test-Chimps/branches/categories-rework/lib/Test/Chimps/Server.pm (original)
+++ Test-Chimps/branches/categories-rework/lib/Test/Chimps/Server.pm Tue Jun 27 19:29:46 2006
@@ -120,61 +120,72 @@
sub _init {
my $self = shift;
- my %args = validate_with
- (params => \@_,
- called => 'The Test::Chimps::Server constructor',
- spec =>
- { base_dir =>
- { type => SCALAR,
- optional => 0 },
- bucket_file =>
- { type => SCALAR,
- default => 'bucket.dat',
- optional => 1 },
- burst_rate =>
- { type => SCALAR,
- optional => 1,
- default => 5,
- callbacks =>
- { "greater than or equal to 0" =>
- sub { $_[0] >= 0 }} },
- variables_validation_spec =>
- { type => HASHREF,
- optional => 1 },
- list_template =>
- { type => SCALAR,
- optional => 1,
- default => 'list.tmpl' },
- max_rate =>
- { type => SCALAR,
- default => (1 / 30),
- optional => 1,
- callbacks =>
- {"greater than or equal to 0" =>
- sub { $_[0] >= 0 }} },
- max_size =>
- { type => SCALAR,
- default => 2**20 * 3.0,
- optional => 1,
- callbacks =>
- { "greater than or equal to 0" =>
- sub { $_[0] >= 0 }} },
- max_smokes_per_subcategory =>
- { type => SCALAR,
- default => 5,
- optional => 1,
- callbacks =>
- { "greater than or equal to 0" =>
- sub { $_[0] >= 0 }} },
- report_dir =>
- { type => SCALAR,
- default => 'reports',
- optional => 1 },
- template_dir =>
- { type => SCALAR,
- default => 'templates',
- optional => 1 }
- });
+ my %args = validate_with(
+ params => \@_,
+ called => 'The Test::Chimps::Server constructor',
+ spec => {
+ base_dir => {
+ type => SCALAR,
+ optional => 0
+ },
+ bucket_file => {
+ type => SCALAR,
+ default => 'bucket.dat',
+ optional => 1
+ },
+ burst_rate => {
+ type => SCALAR,
+ optional => 1,
+ default => 5,
+ callbacks => {
+ "greater than or equal to 0" => sub { $_[0] >= 0 }
+ }
+ },
+ variables_validation_spec => {
+ type => HASHREF,
+ optional => 1
+ },
+ list_template => {
+ type => SCALAR,
+ optional => 1,
+ default => 'list.tmpl'
+ },
+ max_rate => {
+ type => SCALAR,
+ default => 1 / 30,
+ optional => 1,
+ callbacks => {
+ "greater than or equal to 0" => sub { $_[0] >= 0 }
+ }
+ },
+ max_size => {
+ type => SCALAR,
+ default => 2**20 * 3.0,
+ optional => 1,
+ callbacks => {
+ "greater than or equal to 0" => sub { $_[0] >= 0 }
+ }
+ },
+ max_smokes_per_subcategory => {
+ type => SCALAR,
+ default => 5,
+ optional => 1,
+ callbacks => {
+ "greater than or equal to 0" => sub { $_[0] >= 0 }
+ }
+ },
+ report_dir => {
+ type => SCALAR,
+ default => 'reports',
+ optional => 1
+ },
+ template_dir => {
+ type => SCALAR,
+ default => 'templates',
+ optional => 1
+ }
+ }
+ );
foreach my $key (keys %args) {
$self->{$key} = $args{$key};
More information about the Rt-commit
mailing list