I'm trying to create a method in my Files.pm class file, and call it from my
Catalyst app.
The method works when called by an "offline" app outside Catalyst.
But from my Catalyst app, I get 'Unknown error' on server.pl startup.

Maybe I haven't yet figured out the right way to call the method?
Maybe something else?

Here are some bits from table class Files.pm:
==========================
package hde::Schema::Files;

use strict;
use warnings;
use base 'DBIx::Class';

__PACKAGE__->load_components("ResultSetManager","Core");

<snip>

sub make_versioned_filename :ResultSet {
  my ( $self, $project_id, $filename ) = @_;

  yada yada
}
==========================
Here's how I successfully call the method from an offline utility:

my $returned_filename =
 $schema->resultset('Files')->make_versioned_filename( $id, $filename );
==========================
Here are some unsuccessful call attempts from my Catalyst app:

$c->model('hde::Files')->make_versioned_filename( $id, $filename );
Unknown error
$c->model('Files')->make_versioned_filename( $id, $filename );
Unknown error
(I'm patterning this next from code in MojoMojo, that has a model class
'DBIC.pm';
my model class is HdeDB):
$c->model('HdeDB::Files')->make_versioned_filename( $id, $filename );
Unknown error

What to do?

/dennis
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to