diff --git a/lib/AccountManager/Account.pm b/lib/AccountManager/Account.pm index 65896b67f5bce290332c11db71586580f5a9a4c1..7052eb827430eee12e323a0086fd02d6a59833cc 100644 --- a/lib/AccountManager/Account.pm +++ b/lib/AccountManager/Account.pm @@ -114,14 +114,14 @@ sub print { $fd = \*STDOUT unless $fd; printf $fd -"Account ID=%s; password_hash=%s; sp_entityid=%s; profile=%s; scope=%s; creation_date=%s; expiration_date=%s\n", - $self->id(), - $self->password_hash(), - $self->sp_entityid(), - $self->profile(), - $self->scope(), - $self->creation_date()->strftime('%Y:%m:%d'), - $self->expiration_date()->strftime('%Y:%m:%d'); + "Account ID=%s; password_hash=%s; sp_entityid=%s; profile=%s; scope=%s; creation_date=%s; expiration_date=%s\n", + $self->id(), + $self->password_hash(), + $self->sp_entityid(), + $self->profile(), + $self->scope(), + $self->creation_date()->strftime('%Y:%m:%d'), + $self->expiration_date()->strftime('%Y:%m:%d'); } sub internal_uid { diff --git a/lib/AccountManager/Service.pm b/lib/AccountManager/Service.pm index 2676f98ede209c88a69f6b758e60174d24e4980a..539df49d5f419bdd9b23238e153a8df224acc4b6 100644 --- a/lib/AccountManager/Service.pm +++ b/lib/AccountManager/Service.pm @@ -22,17 +22,16 @@ __PACKAGE__->meta->setup( unique_key => [ 'entityid' ], ); -## Print the content of a test account sub print { my ($self, $fd) = @_; $fd = \*STDOUT unless $fd; printf $fd - "ServiceProvider ID=%s; entityid=%s; displayname=%s; contacts=%s\n", - $self->id(), - $self->entityid(), - $self->displayname(), - join(',', $self->contacts()); + "Service ID=%s; entityid=%s; displayname=%s; contacts=%s\n", + $self->id(), + $self->entityid(), + $self->displayname() || '', + join(',', $self->contacts()); } ## Check if email address is a known contact diff --git a/lib/AccountManager/Token.pm b/lib/AccountManager/Token.pm index f74902914f9a8f87fa4f2d084064aa7217dc4fa7..b71c1d9c67beb93e7a51a15a2d265634c4683f17 100644 --- a/lib/AccountManager/Token.pm +++ b/lib/AccountManager/Token.pm @@ -29,10 +29,12 @@ sub print { $fd = \*STDOUT unless $fd; printf $fd -"AuthenticationToken ID=%s; token=%s; email_address=%s; sp_entityid=%s; creation_date=%s\n", - $self->id(), $self->token(), $self->email_address(), - $self->sp_entityid(), - $self->creation_date()->strftime('%Y:%m:%d'); + "Token ID=%s; token=%s; email_address=%s; sp_entityid=%s; creation_date=%s\n", + $self->id(), + $self->token(), + $self->email_address(), + $self->sp_entityid(), + $self->creation_date()->strftime('%Y:%m:%d'); } 1;