Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [stilton] Can't call method "File_RelativePath" Picture Error: Edit Log

Here is the list of edits for this post
Re: [stilton] Can't call method "File_RelativePath" Picture Error
It means that the file_info() method (subroutine) isn't returning a reference....a similar example is when you do a select. Take this as an example:

Code:
my $sth = $DB->table('Links')->select( { Foo => 'Bar' } );
my $row = $sth->fetchrow;

This will work because the select() method returns a blessed reference which you can use to call the fetchrow() method ($sth...you can see what I mean by printing $sth).....however if you were to do:

Code:
my $sth = $DB->table('Links')->select( { Foo => 'Bar' } )->fetchrow;
my $row = $sth->fetchrow;

....you would get the error about not being able to call method fetchrow on an undefined value, this is because when the fetchrow() method is compiled the first time after doing the select, the reference is destroyed and nothing is returned. So then when it tries to run $sth->fetchrow, because $sth is undefined the script doesn't know what to do and dies with an error.

I've never used file_info before so I can't give you a solution to your problem but maybe that explanation will help you solve the problem.

Last edited by:

Paul: Jun 11, 2002, 6:17 AM

Edit Log: