Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: comparing 2 file time date stamps ( Path::Tiny File::stat Time::Piece )

by Anonymous Monk
on Nov 04, 2014 at 13:18 UTC ( #1106027=note: print w/replies, xml ) Need Help??


in reply to Re^3: comparing 2 file time date stamps ( Path::Tiny File::stat Time::Piece )
in thread comparing 2 file time date stamps

There is File::Stat and then there is File::stat; the former advises to use the later if using perl 5.8+. Path::Tiny, used in the code shown previously, has dependency on the later.

  • Comment on Re^4: comparing 2 file time date stamps ( Path::Tiny File::stat Time::Piece )

Replies are listed 'Best First'.
Re^5: comparing 2 file time date stamps ( Path::Tiny File::stat Time::Piece )
by craigt (Acolyte) on Nov 04, 2014 at 14:16 UTC
    I get the following error when I try to execute that subroutine

    path" is not exported by the Path::Tiny module\nCan't continue after import

    I use -

    use File::stat;
    use Path::Tiny qw/ path /;
    use File::Spec;

      path" is not exported by the Path::Tiny module\nCan't continue after import

      All you need is  use Path::Tiny; ... newer versions of Path::Tiny allow typing  use Path::Tiny 'path'; which documents where path() comes from

      Path::Tiny uses File::stat and File::Spec automagically ... stick with the path() api, and get the latest version for the most features and bug fixes

      Both modules are shown as available via ppm http://code.activestate.com/ppm/Path-Tiny/ and http://code.activestate.com/ppm/Time-Piece/

        From Path::Tiny github repository, I saw that "path" was being exported by default from the beginning (around version 0.0x). If OP is using at least a version from that tree, then use Path::Tiny qw[ path ] should work.

        Could OP possibly be using an even older version?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106027]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-08-18 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?