in reply to Re: Re: Re: use and performance
in thread use and performance

Class::Struct is an example of something that does a lot of work on import. This bites the prototype perl6 compiler pretty hard.

/s

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: use and performance
by perrin (Chancellor) on Jun 11, 2003 at 03:49 UTC
    Are you talking about this kind of usage?

    use Class::Struct CLASS_NAME => [ ELEMENT_NAME => ELEMENT_TYPE, ... ];
    You can't skip that call to import, or your struct class would not get created.

    Anyway, if you don't want to import anything you can just call use with an empty list. This is common in mod_perl:

    use CGI ();