PhillipHuang has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I installed File::System(1.16) via CPAN and try to use File::System::Object as example showed at ".cpan/build/File-System-1.16-FnCixg/t/02_glob.t"

#!/usr/bin/perl use strict; use warnings; use File::System::Object; my $obj = 'File::System::Object'; my $file = $obj->root; root@athens:/tmp# perl 1.pl Can't locate object method "root" via package "File::System::Object" a +t 1.pl line 10.

I read the "Object.pm" and found no 'root' method defined in it, while its CPAN pages gives this method. What's the matter? Also some other methods, such as 'is_root','exist' have the same problem. Please give me some hints. Thanks, Phillip

Replies are listed 'Best First'.
Re: can not find some method when using File::System::Object
by Corion (Patriarch) on Aug 02, 2011 at 07:03 UTC

      Thanks. I am still confusing after reading the documents, would you pls show any simply example to describle how to use File::System and File::System::Object?

        I already linked you to File::System. You don't tell me where with the documentation you have problems and what problem you are trying to solve using File::System, so I can't be more specific than telling you to read the documentation.

        If you find the documentation for module to be incomprehensible, I would recommend you use a different, better documented module. But recommending a module alternative means that I know what your goal is.