Changeset 2416 for trunk/LATMOS-Accounts/bin
- Timestamp:
- 06/25/20 09:25:24 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/bin/la-rename
r891 r2416 59 59 $labase->wexported(1); 60 60 61 my $obj = $labase->get_object($otype, $ARGV[0]) or do { 62 die "Object $otype $ARGV[0] not found\n"; 63 }; 61 if ($labase->can('SetCB')) { 62 $labase->SetCB( sub { 63 my ( $base, $res ) = @_; 64 if ($res) { 65 print $base->label . ': Object renamed' . "\n"; 66 $base->commit; 67 } else { 68 warn $base->label . ': Cannot rename object' . "\n"; 69 $base->rollback; 70 } 71 } ); 72 } 64 73 65 74 if (!$labase->rename_object($otype, @ARGV)) { 66 die " Error while renaming $otype $ARGV[0] to $ARGV[1]\n";75 die "Some errors occurs, please check\n"; 67 76 } 68 77 69 $labase->commit;
Note: See TracChangeset
for help on using the changeset viewer.