Last active
April 15, 2023 16:53
-
-
Save lloy0076/11af8ba82ce897cd9ec7a267170b83ed to your computer and use it in GitHub Desktop.
This file contains 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 warnings; | |
use feature ':5.10'; | |
use local::lib; | |
use Carp; | |
use Data::Dumper; | |
use Mojolicious::Lite -signatures; | |
get '/' => sub ($c) { | |
$c->app->log->debug('f00bar'); # I'm trying to figure out where this would log to. | |
$c->render(text => "Mode: " . app->mode); | |
}; | |
get('/foo' => sub ($c) { | |
$c->render(text => 'Foo Bar'); | |
}); | |
app->start(); | |
sub getDir { | |
opendir(my $DH, '.') || croak('Unable to open directory.'); | |
my @files = readdir($DH); | |
return @files; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After doing some digging, it's probably going to STDERR.
...is a nice rendition of: