[Chicago-talk] what's with these attributes?

Jim Thomason jthomasoniii at yahoo.com
Tue Mar 30 09:43:20 CST 2004


So, I was poking around at that Trash Talking App that
Jason posted and noticed in the code that he's using
function attributes. And then it occurred to me that I
don't really know what perl's attributes are used for.

Hence, I poked around perlfunc and
Attribute::Handlers' POD, but didn't really get any
answers. As best as I can tell, they're used as a
gimmick to associate some extra information about some
piece of data (variable, code, etc.) at some point
after compilation or declaration.
Class::Declare::Attributes looks like a fairly nifty
use of them. Did I get it right? Are there any other
good references on the subject? The docs I've found
have seemed a little sparse.

As a side note, in Attribute::Handlers' docs, I saw
this tidbit:

my LoudDecl $loudobj : Loud;

and some mutterings about how the attribute called
corresponds to the package in which the variable is
typed (LoudDecl, in this case). Now this is a syntax
that's complete new to me. Is it strictly something
governing which attributes to call? Or is it useful in
other instances?

-Jim....

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html



More information about the Chicago-talk mailing list