Re: Test::Class weirdness
On Thu, Oct 10, 2002 at 09:42:05PM +0100, Adrian Howard wrote: > If you stick your loop inside a BEGIN {} block I think you'll find that it > works as you expect. > The attribute handler in Test::Class is set to run as a CHECK block (the > default provided by Attribute::Handlers). Since you don't require the > module until runtime the handler gets confused. Yep. That does the trick. Good catch. > I'm running A::H 0.78 - and in my case it just skips running the > handler... so no test methods get defined and nothing gets run. > I am guessing that you're running an earlier version of A::H and that's > why it's passing ANON as the symbol to the Test::Class handler, hence the > confusing error message. Nope, I'm on 0.78 too. I _was_ on 0.76 when the problem first arose, but one of the first things I tried was updating the modules involved... I had also tried the eval "use $_" foreach @modules version but that gives the same problem. This is with latest CPAN version of Test::Class, Attribute::Handlers and UNIVERSAL::require with perl 5.8 > Now I need to figure out if: > (a) this is a bug or a lack of documentation on my part > (b) if/how it can be fixed :-) Best bet is just to mention it in the documentation of this area Thanks a lot.
Re: [ Memory ] Re: Thought
On Wed 02 Oct 2002 13:50, "H.Merijn Brand" <[EMAIL PROTECTED]> wrote: > As a start for a `normal' interface to the interperters internals, this time > no open hack, but a neat interface. > > Very open to additions. > > Useful? > > Feedback please Thank you Dan! Devel::Size from Dan Sugalski is what we all want, don't we? =head1 NAME Devel::Size - Perl extension for finding the memory usage of Perl variables =head1 SYNOPSIS use Devel::Size qw(size total_size); my $size = size("A string"); my @foo = (1, 2, 3, 4, 5); my $other_size = size(\@foo); my $foo = {a => [1, 2, 3], b => {a => [1, 3, 4]} }; my $total_size = total_size($foo); =head1 DESCRIPTION This module figures out the real sizes of Perl variables in bytes. Call functions with a reference to the variable you want the size of. If the variable is a plain scalar it returns the size of the scalar. If the variable is a hash or an array, use a reference when calling. -- H.Merijn BrandAmsterdam Perl Mongers (http://amsterdam.pm.org/) using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3, WinNT 4, Win2K pro & WinCE 2.11. Smoking perl CORE: [EMAIL PROTECTED] http:[EMAIL PROTECTED]/ [EMAIL PROTECTED] send smoke reports to: [EMAIL PROTECTED], QA: http://qa.perl.org
Re: [ Memory ] Re: Thought
-BEGIN PGP SIGNED MESSAGE- Moin, On 11-Oct-02 H.Merijn Brand carved into stone: > On Wed 02 Oct 2002 13:50, "H.Merijn Brand" <[EMAIL PROTECTED]> wrote: >> As a start for a `normal' interface to the interperters internals, this >> time >> no open hack, but a neat interface. >> >> Very open to additions. >> >> Useful? >> >> Feedback please > > Thank you Dan! > > Devel::Size from Dan Sugalski is what we all want, don't we? YES! Juhu! Cheers, Tels - -- perl -MDev::Bollocks -le'print Dev::Bollocks->rand()' apprehensively disintermediate intuitive channels http://bloodgate.com/perl My current Perl projects PGP key available on http://bloodgate.com/tels.asc or via email -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBPabj3ncLPEOTuEwVAQF1XQf/RxkYADqROCri4xdjgpZDtBZxlEGaHKlR kF+bU4Hchi+vNLCYQzPztQqNiXLuTgqh2kFKiLZRY480fd1e5nZ7a9Mh0YILDz71 GjJ5EpVzyiLXtkt1tX7ymGr30RoA6eFvS5MSI86GeVZ6CWRg8Ks9EslkF2Jh29f0 ZiJVMwUEQZusBVjZxZa+30tigdc9ixNAHX4LdY33kITTdVrxwg3pS6SrTxLJn7Fi +wjie0DGNsQK6WGswbzy/5hPWuhzBwz549wva89kO5H/h6ljJVfRq16dwJKHy5eS tKkfmnsz2peBvsxGJRRvrcZPz/rzGxZlcWtY1KT6qjlIEKlbmnGE0Q== =FsWs -END PGP SIGNATURE-
Re: [ Memory ] Re: Thought
At 4:45 PM +0200 10/11/02, Tels wrote: -BEGIN PGP SIGNED MESSAGE- Moin, On 11-Oct-02 H.Merijn Brand carved into stone: On Wed 02 Oct 2002 13:50, "H.Merijn Brand" <[EMAIL PROTECTED]> wrote: As a start for a `normal' interface to the interperters internals, this time no open hack, but a neat interface. Very open to additions. Useful? Feedback please Thank you Dan! Devel::Size from Dan Sugalski is what we all want, don't we? YES! Juhu! Well, then, you've got it. :) It's mostly done, but if someone wants to take it and finish the rest (It doesn't do formats right, nor does it completely handle IO handles or code refs) I certainly wouldn't mind. -- Dan --"it's like this"--- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk