# Scope.pm in webapp root dir
package Scope;
sub new {
return bless {}, shift
}
sub DESTROY {
print "going out of scope...\n";
}
# webapp
package MyApp;
use lib '.';
use Scope;
use Dancer2;
use Dancer2::Plugin::Database;
our $VERSION = '0.1';
my $obj = Scope->new;
####
plackup -R lib,bin bin/app.pl
####
Watching lib bin bin/lib bin/app.pl for file updates.
going out of scope
HTTP::Server::PSGI: Accepting connections at http://0:5000/