We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1948959 + 08b5aba commit 0593450Copy full SHA for 0593450
lib/Github/Backup.pm
@@ -60,10 +60,9 @@ sub BUILD {
60
$self->token($ENV{GITHUB_TOKEN}) if $ENV{GITHUB_TOKEN};
61
}
62
63
- for ($self->api_user, $self->token, $self->dir){
64
- if (! $_){
65
- croak "When instantiating an object, the 'api_user', 'token' and " .
66
- "'dir' parameters are mandatory...\n";
+ for my $key (qw/api_user token dir/){
+ if (! $self->{$key}){
+ croak "ERROR: Missing mandatory parameter [$key].\n";
67
68
69
@@ -316,4 +315,3 @@ under the terms of either: the GNU General Public License as published
316
315
by the Free Software Foundation; or the Artistic License.
317
318
See L<http://dev.perl.org/licenses/> for more information.
319
-
0 commit comments