Hi all, =). This year, I used mojolicious for the first time.
I noticed something called is_file and assumed it took a file reference, and checked if there was actually such a file. Well...it doesn't seem to serve that purpose / work in that way at all. I've changed my code to use -e on an actual path and file name instead, to check if it exists. So I'm left scratching my head - what does is_file actually do, if it doesn't check if a file exists? Documentation is just one word: "True". Indicating it returns true when given a file reference. Is it just used to check that a variable is a file reference? http://mojolicio.us/perldoc/Mojo/Asset/File#is_file I've been speaking vaguely. To be precise, I started off with this, which didn't work: my $parts_txt_file_ref = Mojo::Asset::File->new(path => $variable_containing_path.'/parts.txt'); if ($parts_txt_file_ref->is_file) { #do something }; And I changed it to this, which worked: my $parts_path= $variable_containing_path.'/parts.txt'; if (-e $parts_path && !-d $parts_path) { #do something }; Anyway, pretty happy to have joined this group, =). Thanks for having me! =). Yours, Andrew. -- 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 http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
