Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Why Does Test::Deep Kill Test::Class

by fergal (Chaplain)
on Jun 20, 2008 at 14:46 UTC ( [id://693170]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why Does Test::Deep Kill Test::Class
in thread Why Does Test::Deep Kill Test::Class

This and some other stuff are the root of my hatred of default exports (and the lack of a nice way to use things without exports at all).

Replies are listed 'Best First'.
Re^4: Why Does Test::Deep Kill Test::Class
by Your Mother (Archbishop) on Jan 09, 2009 at 19:59 UTC

    A bit late reply, sorry, but I find "()" to be quite nice. You just have to cultivate the habit of using it.

      () would be fine if you didn't then have to type

      use Foo::Bar::Woz::Snuts (); Foo::Bar::Woz::Snuts::Wibble($x, $y)

      Python gets it right (well better at least) with

      from foo.bar.woz import snuts; snuts.wibble(x, y)

      and suchlike. This is pretty much impossible in Perl due to symbol table access being absolute, not relative.

        You don't if the module does its exporting right, and most do.

        use Foo::Bar::Woz::Snuts qw( Wibble );

        I realize you're talking about having relative spaces in the code though. To me that would add arbitrary levels of (human) ambiguity for the hacker trying to read it. I think this could be solved in Perl too with some export/namespace alias magick but I wouldn't like or use the feature.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-03-19 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found