package ECSInkassoWeb::Controller::Progress; use strict; use warnings; use Data::Dumper; use base qw(Catalyst::Controller ECSInkassoWeb::Controller::Base); use FileSystemObjects::File; sub get : Local { my ( $self, $c ) = @_; my $token = $c->req->{parameters}->{token}; my $konfig = ECS::Inkasso::Konfig->new($c); my $f = FileSystemObjects::File->new( $konfig->{location}->{progress} ."/$token" ); my $h = $f->open("<"); $_ = <$h>; chomp; $c->response->headers->header('content-type' => "text/plain; charset=UTF-8"); $c->response->body( $_ ); } 1;