# 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;