in reply to Class::Struct problem

Would the following work for you?
package XXX; use strict; use warnings; use Class::Struct; struct('field' => '$'); package main; use strict; use warnings; XXX->new();

Replies are listed 'Best First'.
Re^2: Class::Struct problem
by rovf (Priest) on Jun 08, 2010 at 12:51 UTC
    It would work, but I form the viewpoint of code organization, I would strongly prefer having the struct stuff near the end of my file instead of at the beginning.

    -- 
    Ronald Fischer <ynnor@mm.st>
      Just put your class inside a BEGIN block and put it wherever you want.

        Actually, I'm using now an INIT block, but the effect is the same in this case.

        -- 
        Ronald Fischer <ynnor@mm.st>