| 
     
      
      
      From: Robert M. <rm...@po...> - 2005-11-07 21:41:46
      
     
   | 
Glenn Linderman wrote:
>>
>>   use Win32::GUI ();
>>
>> will not export anything, as you'd expect, and as happens today.  I 
>> think this is what Jez is already doing.
> 
> I'm doing that.  But I don't know about Jez.  On the other hand, use 
> Win32::GUI(); also turns off exporting of (non-constant) functions, 
> which may not be desirable.
I am not aware that Win32::GUI exports any non-constant functions.  Some 
of the sub-classes appear to AUTOLOAD some functions (although I'm not 
sure they actually do), but this should not be affected.  Am I missing 
something?
>>>>>> (4) What other groups of constants should we have?
> 
  > Hmm.  With 350 names in :compatibility_win32_gui, more files might be
> needed.  Maybe change Tags.pm
> 
>   sub tag {
>     my $spec = shift;
> 
>     if(defined $TAG_SPECS{$spec}) {
>         my @names = ();
>         my @syms = keys(%$C);
>         foreach my $patn (@{$TAG_SPECS{$spec}}) {
>             push @names, grep(/$patn/, @syms);
>         }
>         return \@names;
>     }
> +     else {
> +         $TAG_SPECS($spec) = <read-the-file-named-after-the-tag>;
> +         my @syms = keys(%$C);
> +         foreach my $patn (@{$TAG_SPECS{$spec}}) {
> +             push @names, grep(/$patn/, @syms);
> +         }
> +         return \@names;
> +     }
>     return undef;
>   }
> 
> Sorry for the pseudo-code above, maybe it should be
> 
> +        require Win32::GUI::Constants::Tags::$spec;
> +               $TAG_SPECS($spec) = $Win32::GUI::Constants::Tags::$spec::C;
> 
Probably something like
   eval "require Win32::GUI::Constants::Tags_$spec";
   if($@) {
     warnings::warnif qq(Failed to load definition for tag ':$spec': $@)
   }
   else {
     $TAG_SPEC{$spec} = \@{"Win32::GUI::Constants::Tags_$spec::C"};
  }
Although I'll not head down this route just yet - I'll add a comment to 
the Tags.pm file.
Thanks for the feedback.
Regards,
Rob.
 |