# inverse of $app->static->file(..) ?

my $abs = '/path/to/some/file/inside/my/app/public/yay.txt';
my $rel;

for my $p (@{ $app->static->paths }) {
  $rel =~ s!^$p!! and last;
}