Revision 1765abe6
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
scripts/rose_auto_create_model.pl | ||
---|---|---|
help => sub { pod2usage(verbose => 99, sections => 'NAME|SYNOPSIS|OPTIONS') },
|
||
quiet => \ my $quiet,
|
||
diff => \ my $diff,
|
||
'color!' => \ my $color,
|
||
);
|
||
|
||
$options->{client} = $client;
|
||
$options->{all} = $all;
|
||
$options->{nocommit} = $nocommit;
|
||
$options->{quiet} = $quiet;
|
||
$options->{color} = defined $color ? $color : 1;
|
||
|
||
if ($diff) {
|
||
if (eval { require Text::Diff; 1 }) {
|
||
... | ... | |
|
||
Text::Diff::diff($text_a, $text_b, { OUTPUT => sub {
|
||
for (split /\n/, $_[0]) {
|
||
print colored($_, $colors{substr($_, 0, 1)}), $/;
|
||
if ($config{color}) {
|
||
print colored($_, $colors{substr($_, 0, 1)}), $/;
|
||
} else {
|
||
print $_, $/;
|
||
}
|
||
}
|
||
}});
|
||
}
|
Auch abrufbar als: Unified diff
nocolor ooption für rose_auto_create_model