This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use FindBin; | |
use lib "$FindBin::Bin/../lib"; | |
use lib "$FindBin::Bin/../../lib"; | |
# Application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use common::sense; | |
sub D($) { | |
for (scalar reverse shift) { | |
s/(\d{3})(?=\d)/$1 /g; | |
return scalar reverse; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use common::sense; | |
say 'hello, world' or die 'hello, world'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use common::sense; | |
my @a = qw(q w e r t y); | |
my @b = qw(u i o p q); | |
say 1 if grep { defined } @{{ map { $_ => 1 } @a }}{ @b }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use common::sense; | |
use lib '../lib'; | |
$ENV{MOJO_APP} ||= 'App'; | |
use Mojolicious::Commands; Mojolicious::Commands->start; | |
package App; | |
use common::sense; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use lib qw(lib ../mojo/lib); | |
$ENV{MOJO_APP} ||= 'App'; | |
use Mojolicious::Commands; Mojolicious::Commands->start; | |
package App; | |
use strict; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use lib '../mojo/lib'; | |
BEGIN { $ENV{MOJO_TMPDIR} = 'tmp/upload' }; | |
use Mojolicious::Lite; | |
use Data::Dumper; | |
get '/' => 'form'; | |
post '/' => sub { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
my @SOURCE = (2000, 1500); | |
my @FORMAT = (1920, 1080); | |
my $K = '16x9'; | |
my @check = check_video($SOURCE[0], $SOURCE[1], $FORMAT[0], $FORMAT[1], $K); | |
my $x = $check[1] / 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package App::Controller; | |
use strict; | |
use base 'Mojolicious::Controller'; | |
# alias | |
sub redirect { | |
my $self = shift; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find all env | |
find ~/mojo/lib/ -type f -print0 | xargs -0 grep -on -E --colour 'MOJO_[A-Z_]+' | |
# find uniq env | |
find ~/mojo/lib/ -type f -print0 | xargs -0 grep -oh -E --colour 'MOJO_[A-Z_]+' | sort -u | |
__END__ | |
Total: 23 | |
MOJO_APP |