Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Updated allowed variable formats in fornodesrc #1

Merged
merged 1 commit into from

2 participants

@mithun

Allow fornodesrc variables to contain non-word characters as well (allows variables like foo.bar and foo-bar)

@agentzh agentzh merged commit ed59bcc into agentzh:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 4, 2011
  1. @mithun
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/SSH/Batch/ForNodes.pm
View
4 lib/SSH/Batch/ForNodes.pm
@@ -72,7 +72,7 @@ sub parse_line ($$) {
my $rcfile = $_[1];
if (/^\s*([^=\s]*)\s*=\s*(.*)/) {
my ($var, $def) = ($1, $2);
- if ($var !~ /^[-\w]+$/) {
+ if ($var !~ /^\S+$/) {
die "Invalid variable name in $rcfile, line $.: ",
"$var\n";
}
@@ -179,7 +179,7 @@ sub parse_term ($) {
local *_ = \($_[0]);
if (/^ \{ ( [^}\s]* ) \} $/x) {
my $var = $1;
- if ($var !~ /^[-\w]+$/) {
+ if ($var !~ /^\S+$/) {
die "Invalid variable name in term $_: $var\n";
}
my $set = $Vars{$var};
Something went wrong with that request. Please try again.