Writing to attributes from perl scripts

If you’re running a BeOS web server other than PoorMan (i.e., one that does CGI) and want to be able to extract attributes from BFS files, see the TrackerBase page on this site. What that page doesn’t tell you is how to create attributes from your perl scripts.
Once you’ve got Tom Spindler’s Be::Attribute perl module installed, use the syntax:

Be::Attribute::WriteAttr(node, attr, what, type, howbig);

For example, if you want to change the attribute of a certain email file called „emailfilename,“ your script might look something like this:

 use Be::Attribute; $MailNode = Be::Attribute::GetBNode("/boot/home/mail/in/emailfilename"); Be::Attribute::WriteAttr($MailNode, "MAIL:status", "New", "String", "50"); 
 

Comments

No comments so far.

(comments are closed)

Kategorien

 
 
Blogroll
Resources