Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: treemap

by princepawn (Parson)
on Mar 01, 2001 at 22:28 UTC ( [id://61611]=note: print w/replies, xml ) Need Help??


in reply to treemap

Something else I just thought of. There is one other type of tree that people deal with in Perl: directory trees.

If there were someway to tie a directory tree to a nested Perl data structure, then treemap would be roughly equivalent to File::Find, but this time it would require yet another set of context variables to be useful: $File::Find::name, $File::Find::directory, and $_.

Replies are listed 'Best First'.
Re: Re: treemap
by Rudif (Hermit) on Mar 11, 2001 at 02:05 UTC
    Directory tree is an intriguing subject. It looks like an instance of the Composite pattern - nodes are simple nodes (files) and collections (directories).
    I had a go at mapping a dirtree to a tree of hashes, in How to map a directory tree to a perl hash tree and had good advice on how to improve it.
    Do you think that a Perl package would be useful? What methods would you suggest? Should it Tie to the file system?

    Rudif

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://61611]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-25 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found