SPUG: Sub Attributes

Parr, Ryan Ryan.Parr at wwireless.com
Fri May 3 13:09:20 CDT 2002


I am indeed using 5.6.1, but my example doesn't work. But even if it did,
what would it do?

For example, Apache::AxKit::XSP::Language::SimpleTaglib uses a prototype of:

    sub some_tag : attrib(id) attribOrChild(some-param) node(result)
keepWhitespace;

Apparently these attributes reformat the datastructures coming in and going
out, but how?

Ryan Parr

Common sense is the collection of prejudices acquired by age eighteen.
		-- Albert Einstein


-----Original Message-----
From: Jonathan Mark [mailto:jhmark at xenops.com] 
Sent: Friday, May 03, 2002 11:03 AM
To: Parr, Ryan
Cc: SPUG List
Subject: Re: SPUG: Sub Attributes


> Could anyone here let me in on what these attributes are and how to 
> use them? The perlsub and attributes man pages unfortunately are not 
> as informative as I'd require them to be.

What version of Perl are you using ...
I read somewhere that the sub attributes first appeared in version 5.6.1. In
prior versions you can accomplish the same thing using "use attributes".

I have not used these before either, but your example looks correct to me.

best regards,

	Jonathan Mark

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list