#!/usr/bin/perl -w
use strict;
use FS::SelfService qw(passwd);
my $rv = passwd(
'username' => 'ivan',
'old_password' => 'heyhoo',
'new_password' => 'haloo',
);
my $error = $rv->{error};
if ( $error eq 'Incorrect password.' ) {
exit;
} else {
die $error if $error;
die "no error";
}