Commit 78471a82 authored by Leigh Stoller's avatar Leigh Stoller

Add a predicate.

parent 85796ad8
#!/usr/bin/perl -wT
#
# Copyright (c) 2009-2015 University of Utah and the Flux Group.
# Copyright (c) 2009-2016 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
......@@ -381,6 +381,7 @@ sub id($) { return field($_[0], "id"); }
sub IsAuthority() { return $_[0]->type() =~ /^authority$/i ? 1 : 0; }
sub IsSA($) { return $_[0]->id() =~ /^SA$/i ? 1 : 0; }
sub IsCM($) { return $_[0]->id() =~ /^CM$/i ? 1 : 0; }
sub IsRoot($) { return $_[0]->id() =~ /^root$/i ? 1 : 0; }
#
# Stringify for text context.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment