[Bps-public-commit] r11394 - in SVN-PropDB: .
jesse at bestpractical.com
jesse at bestpractical.com
Wed Apr 2 08:09:58 EDT 2008
Author: jesse
Date: Wed Apr 2 08:09:08 2008
New Revision: 11394
Modified:
SVN-PropDB/ (props changed)
SVN-PropDB/lib/Prophet/Test.pm
Log:
r28996 at 31b: jesse | 2008-04-02 02:06:56 -1000
* in_gladiator method in test
Modified: SVN-PropDB/lib/Prophet/Test.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Test.pm (original)
+++ SVN-PropDB/lib/Prophet/Test.pm Wed Apr 2 08:09:08 2008
@@ -3,7 +3,7 @@
package Prophet::Test;
use base qw/Test::More Exporter/;
our @EXPORT = qw/as_alice as_bob as_charlie as_david as_user run_ok repo_uri_for run_script run_output_matches replica_last_rev replica_merge_tickets replica_uuid_for fetch_newest_changesets ok_added_revisions replica_uuid
-serialize_conflict serialize_changeset
+serialize_conflict serialize_changeset in_gladiator
/;
use File::Path 'rmtree';
@@ -43,6 +43,25 @@
}
}
+use Devel::Gladiator;
+
+sub in_gladiator (&) {
+ my $code = shift;
+
+ my $types;
+ for (@{ Devel::Gladiator::walk_arena() }) {
+ $types->{ref($_)}--;
+ }
+
+ $code->();
+ for (@{ Devel::Gladiator::walk_arena() }) {
+ $types->{ref($_)}++;
+ }
+ map {$types->{$_} || delete $types->{$_} } keys %$types;
+ warn YAML::Dump($types);
+
+}
+
=head2 run_script SCRIPT_NAME [@ARGS]
Runs the script SCRIPT_NAME as a perl script, setting the @INC to the same as our caller
More information about the Bps-public-commit
mailing list