Skip to content

Commit

Permalink
change all instances of print to say
Browse files Browse the repository at this point in the history
We have say, we should use it.
  • Loading branch information
preaction committed Dec 14, 2014
1 parent baa115c commit 1124203
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions lib/Statocles/App/Blog.pm
Expand Up @@ -110,13 +110,13 @@ sub command {
my ( $self, $name, @argv ) = @_;

if ( !$argv[0] ) {
print STDERR "ERROR: Missing command\n";
print STDERR eval "qq{$USAGE_INFO}";
say STDERR "ERROR: Missing command";
say STDERR eval "qq{$USAGE_INFO}";
return 1;
}

if ( $argv[0] eq 'help' ) {
print eval "qq{$USAGE_INFO}";
say eval "qq{$USAGE_INFO}";
}
elsif ( $argv[0] eq 'post' ) {
my %opt;
Expand All @@ -126,7 +126,7 @@ sub command {

my $title = join " ", @argv[1..$#argv];
if ( !$ENV{EDITOR} && !$title ) {
print STDERR <<"ENDHELP";
say STDERR <<"ENDHELP";
Title is required when \$EDITOR is not set.
Usage: $name post <title>
Expand Down Expand Up @@ -169,12 +169,12 @@ ENDHELP
$slug =~ s/\s+/-/g;
my $path = Path::Tiny->new( @date_parts, "$slug.yml" );
my $full_path = $self->store->write_document( $path => \%doc );
print "New post at: $full_path\n";
say "New post at: $full_path";

}
else {
print STDERR qq{ERROR: Unknown command "$argv[0]"\n};
print STDERR eval "qq{$USAGE_INFO}";
say STDERR qq{ERROR: Unknown command "$argv[0]"};
say STDERR eval "qq{$USAGE_INFO}";
return 1;
}

Expand Down
6 changes: 3 additions & 3 deletions lib/Statocles/Command.pm
Expand Up @@ -44,7 +44,7 @@ sub main {
return pod2usage(0) if $opt{help};

if ( $opt{version} ) {
print "Statocles version $Statocles::Command::VERSION (Perl $^V)\n";
say "Statocles version $Statocles::Command::VERSION (Perl $^V)";
return 0;
}

Expand Down Expand Up @@ -72,7 +72,7 @@ sub main {
my $app = $apps->{$app_name};
my $root = $app->url_root;
my $class = ref $app;
print "$app_name ($root -- $class)\n";
say "$app_name ($root -- $class)";
}
return 0;
}
Expand All @@ -91,7 +91,7 @@ sub main {
# Find the port we're listening on
my $id = $daemon->acceptors->[0];
my $handle = $daemon->ioloop->acceptor( $id )->handle;
print "Listening on " . sprintf( 'http://%s:%d', $handle->sockhost || '127.0.0.1', $handle->sockport ) . "\n";
say "Listening on " . sprintf( 'http://%s:%d', $handle->sockhost || '127.0.0.1', $handle->sockport );

# Give control to the IOLoop
Mojo::IOLoop->start;
Expand Down
4 changes: 2 additions & 2 deletions lib/Statocles/Template.pm
Expand Up @@ -65,11 +65,11 @@ around BUILDARGS => sub {
|| $caller_class->isa( 'Sub::Quote' )
|| $caller_class->isa( 'Method::Generate::Constructor' )
) {
#; print "Class: $caller_class\n";
#; say "Class: $caller_class";
$i++;
$caller_class = (caller $i)[0];
}
#; print "Class: $caller_class\n";
#; say "Class: $caller_class";
$args->{path} = join " line ", (caller($i))[1,2];
}
return $args;
Expand Down

0 comments on commit 1124203

Please sign in to comment.