X-Git-Url: http://git.ieval.ro/?p=gruntmaster-data.git;a=blobdiff_plain;f=lib%2FGruntmaster%2FApp%2FCommand%2FEdit.pm;h=3257903d469515ec527914b58f3c5ff9ed8caa60;hp=24785ab01996e300122fef193fbc39d719938655;hb=8ab124f5b4b8d8c871c3bf2c3fb11eb17f61d2f6;hpb=5e26317ea435eaa5dd8d8fa7ccef5fd0e883b998 diff --git a/lib/Gruntmaster/App/Command/Edit.pm b/lib/Gruntmaster/App/Command/Edit.pm index 24785ab..3257903 100644 --- a/lib/Gruntmaster/App/Command/Edit.pm +++ b/lib/Gruntmaster/App/Command/Edit.pm @@ -10,6 +10,9 @@ use File::Slurp qw/read_file write_file/; use Gruntmaster::App '-command'; use Gruntmaster::Data; +use Gruntmaster::App::Command::Set; +BEGIN { *PAGES = *Gruntmaster::App::Command::Set::PAGES } + sub usage_desc { '%c [-cjpu] edit id column' } sub validate_args { @@ -28,6 +31,7 @@ sub execute { my $editor = $ENV{EDITOR} // 'editor'; system $editor, $file; db->update($self->app->table, {$col => scalar read_file $file}, {id => $obj}); + purge PAGES->{$self->app->table}.$_ for '', $obj; } 1;