},
setuptype => {
type => "internal",
- default => "Standard",
+ default => "Yaml",
description => "perl class to use to dump setup file",
safe => 0,
rebuild => 0,
foreach my $key (keys %s) {
push @ret, $key, $s{$key}->{default};
}
- use Data::Dumper;
return @ret;
}
|
"([^"]*?)" # 3: single-quoted value
|
- (\S+) # 4: unquoted value
+ '''(.*?)''' # 4: triple-single-quote
+ |
+ <<(?<start>[a-zA-Z]+)\n(?<heredoc>.*?)\n\k<start> # 5, 6: heredoc'd value.
+ |
+ (\S+) # 7: unquoted value
)
(?:\s+|$) # delimiter to next param
- }sgx) {
+ }msgx) {
my $key=$1;
my $val;
if (defined $2) {
elsif (defined $4) {
$val=$4;
}
+ elsif (defined $7) {
+ $val=$7;
+ }
+ elsif (defined $+{heredoc}) {
+ $val=$+{heredoc};
+ }
if (defined $key) {
push @params, $key, $val;
|
"[^"]*?" # single-quoted value
|
+ <<(?<start>[a-zA-Z]+)\n(?<heredoc>.*?)\n\k<start> # heredoc'd value.
+ |
+ '''.*?''' # triple-single-quoted value
+ |
[^"\s\]]+ # unquoted value
)
\s* # whitespace or end
|
"[^"]*?" # single-quoted value
|
+ '''.*?''' # triple-single-quoted value
+ |
+ <<(?<start>[a-zA-Z]+)\n(?<heredoc>.*?)\n\k<start> # heredoc'd value.
+ |
[^"\s\]]+ # unquoted value
)
\s* # whitespace or end