Skip to content

Instantly share code, notes, and snippets.

@tomill
Created November 11, 2010 10:34
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 tomill/672319 to your computer and use it in GitHub Desktop.
Save tomill/672319 to your computer and use it in GitHub Desktop.
sub foo {
my ($self, $args) = rule {
uri => { isa => 'Str', xor => [qw(schema host path_query)] },
schema => { isa => 'Str', default => 'http' },
host => { isa => 'Str', default => '127.0.0.1' },
path_query => { isa => 'Str', default => '/' },
method => { isa => 'Str', default => 'GET' },
} @_;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment