Hi group,
when I use "plugin 'RenderFile';" in single file application it works but I
dont know how to use it in multiple file scheme.
when I add "$self->plugin('RenderFile');" to my_app/lib/MyApp.pm
there is no log errors but it doesn't work.its mean the celFileMetadata.xlsx
is created by doesnt pushed to web browser.
when I add "$self->plugin('RenderFile');" to
my_app/lib/MyApp/Celfilesmetainfo.pm
than got error
Can't locate object method "plugin" via package "MyApp::Celfilesmetainfo"
at /usr/local/share/perl5/Mojolicious.pm line 138
should I add it to my_app/my_app script or somewhere else?
Thank you,
tj
part of code from my_app/lib/MyApp/Celfilesmetainfo.pm
sub gatherCelMetadata{
my $self = shift;
$self->plugin('RenderFile');
my $workbookWrite = Excel::Writer::XLSX->new( 'celFileMetadata.xlsx' );
my $worksheetWrite = $workbookWrite->add_worksheet();
...
for my $token ( @fields ) {
$worksheetWrite->write( $row, $col, $token );
}
....
$self->render_file(filepath =>
'/home/test/tmp/my_app/celFileMetadata.xlsx', 'filename' =>
'celFileMetadata.xlsx' );
$self->redirect_to('/');
}
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.