Dist-Zilla-BeLike-CSJEWELL

changeset 19:9cf48703840d

Adding a check for getting the site information.
author Curtis Jewell <csjewell@cpan.org>
date Fri Aug 13 11:32:54 2010 -0600 (2010-08-13)
parents ec13518aa623
children d1177f5efb12
files lib/Dist/Zilla/Plugin/CSJEWELL/FTPUploadToOwnSite.pm
line diff
     1.1 --- a/lib/Dist/Zilla/Plugin/CSJEWELL/FTPUploadToOwnSite.pm	Fri Aug 13 11:27:41 2010 -0600
     1.2 +++ b/lib/Dist/Zilla/Plugin/CSJEWELL/FTPUploadToOwnSite.pm	Fri Aug 13 11:32:54 2010 -0600
     1.3 @@ -37,7 +37,10 @@
     1.4  	my ( $self, $archive ) = @_;
     1.5  
     1.6  	my $site     = $self->site();
     1.7 -	my $siteinfo = Net::Netrc->lookup( $self->site() );
     1.8 +	my $siteinfo = Net::Netrc->lookup( $site );
     1.9 +	if (not $siteinfo) {
    1.10 +		$self->log_fatal("Could not get information for $site from .netrc.");
    1.11 +	}
    1.12  	my ( $user, $password, undef ) = $siteinfo->lpa();
    1.13  
    1.14  	my $ftp = Net::FTP->new(