#!/usr/bin/perl use Test::Terr'ist; use strict; my $suspect = Test::Terr'ist->suspect(shift || "this individual"); if ( $suspect->can("boom") ) { my %findings; print "$suspect is a Terrorist because:\n"; my @facts = @ARGV ? @ARGV: @Test::Terr'ist::charges; $findings{$suspect->$_}++ for @facts; my $sum; $sum += $findings{$_} for keys %findings; printf " %.2f%%: $_\n", $findings{$_} / $sum * 100, $_ for keys %findings; } else { print "$suspect is not found to be a terr'ist.\n"; print "please file a bug report for Test::Terr'ist.\n"; print "Thank you.\n"; }