FTN::Nodelist - Process FTN nodelist
my $ndl = new FTN::Nodelist(-file => '/fido/var/ndl/nodelist.*'); if (my $node = $ndl->getNode('2:550/4077')) { print $node->sysop(); } else { warn 'Cannot find node'; }
FTN::Nodelist contains functions that can be used to process Fidonet Technology Network nodelist and pointlist.
FTN::Nodelist
This method creates FTN::Nodelist object. Can get following arguments:
Nodelist file path:
-file => '/path/to/nodelist'
Path can point to definite file (ex.: '/var/ndl/nodelist.357') or contain wildcard (.*) instead of digital extension. Maximum extension value will be used to find exact nodelist (ex.: '/var/ndl/nodelist.*')
'/var/ndl/nodelist.357'
'/var/ndl/nodelist.*'
Cacheable status:
-cache => 0/1
Default is 1. When cacheable status is set to 1, all search results are stored in object cache. It saves resources when searching the same address, but eats memory to store results. Choose appropriate behaviour depending on your tasks.
Takes FTN address as argument. Address can be feed in 3D or 4D style (Zone:Net/Node, Zone:Net/Node.Point).
If 4D style is specified, point address is searching.
Returns FTN::Nodelist::Node object if node can be found in nodelist.
FTN::Nodelist::Node
See FTN::Nodelist::Node for details how these results can be used.
Examples:
my $node = $ndl->getNode('2:550/0'); my $node = $ndl->getNode('2:2/0'); my $node = $ndl->getNode('2:550/4077'); my $node = $ndl->getNode('2:550/4077.101');
When using wildcard in nodelist path, maximum extension is taken into account. It may bring to wrong results when there are many nodelist files and current nodelist has lesser number (for example, nodelist.365 and nodelist.006).
nodelist.365
nodelist.006
This issue may be resolved in next versions of FTN::Nodelist.
Serguei Trouchelle <stro@railways.dp.ua>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Copyright (c) 2005-2007 Serguei Trouchelle. All rights reserved.
To install FTN::Nodelist, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FTN::Nodelist
CPAN shell
perl -MCPAN -e shell install FTN::Nodelist
For more information on module installation, please visit the detailed CPAN module installation guide.