Skip to content

Instantly share code, notes, and snippets.

@MadcapJake
Created February 16, 2016 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MadcapJake/c74615bdad979fe4dd3a to your computer and use it in GitHub Desktop.
Save MadcapJake/c74615bdad979fe4dd3a to your computer and use it in GitHub Desktop.
our $throw-on-mismatches;
has Bool $!throw-on-mismatches;
multi method throw-on-mismatches(Test::Lab::Experiment:U : Bool $flag?) {
with $flag {
Test::Lab::Experiment::<$throw-on-mismatches> = $flag
} else {
Test::Lab::Experiment::<$throw-on-mismatches> // False
}
}
multi method throw-on-mismatches(Test::Lab::Experiment:D : Bool $flag?) {
with $flag {
$!throw-on-mismatches = $flag
} else {
$!throw-on-mismatches // Test::Lab::Experiment.throw-on-mismatches
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment