in reply to Re: Using Tie::Dir
in thread Using Tie::Dir

Go figure, besides me feeling stupid and missing that, the documentation doesn't mention that *lol*
thanks stevie...

I tried re-inventing the wheel again, but everytime I push it, it still falls flat on it's side...

Replies are listed 'Best First'.
Re^3: Using Tie::Dir
by stevieb (Canon) on Aug 25, 2017 at 18:40 UTC

    Perfectly acceptable. ++ for using strict.

    Note that the distribution's last release was 1996, and I don't even know if strict was available back then (I'm not in a good position to look up when it was added). I didn't come onto the scene until 2001. strict likely wasn't in widespread use back then if it was available, and without strict (subs), barewords are legal.

Re^3: Using Tie::Dir
by kcott (Archbishop) on Aug 26, 2017 at 18:37 UTC
    "... the documentation doesn't mention that ..."

    Tie::Dir is over 21 years old (latest release [v1.02]: 26 Apr 1996). There's quite a few things that its documentation tells you, or omits to tell you, that you should probably change (beyond the bareword issue you've already encountered).

    You appear to be using strict, which is very good: keep doing that. You should use lexical variables, that aren't shown in the documentation, or strict will complain about that.

    In addition, wherever it shows code like:

    new Tie::Dir arg1, ...;

    You should change that to:

    Tie::Dir::->new(arg1, ...);

    See "perlobj: Invoking Class Methods" for a discussion of why you should do this.

    — Ken