Case study: modattr.pl
if (!defined($value) || !$value) {
print "No value provided for the attribute $attr\n";
$changed = $entry->addValue($attr, $value);
if ($changed && $opt_v) {
print "Added attribute to ",
$entry->getDN(), "\n" if $opt_v;
$entry->setValue($attr, $value);
print "Set attribute for ",
$entry->getDN(), "\n" if $opt_v;