diff options
Diffstat (limited to 'xpp/utils/zconf/Zaptel.pm')
-rw-r--r-- | xpp/utils/zconf/Zaptel.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/xpp/utils/zconf/Zaptel.pm b/xpp/utils/zconf/Zaptel.pm new file mode 100644 index 0000000..394aa8e --- /dev/null +++ b/xpp/utils/zconf/Zaptel.pm @@ -0,0 +1,24 @@ +package Zaptel; +# +# Written by Oron Peled <oron@actcom.co.il> +# Copyright (C) 2007, Xorcom +# This program is free software; you can redistribute and/or +# modify it under the same terms as Perl itself. +# +#use strict; + +my $proc_base = "/proc/zaptel"; + +sub spans() { + my @spans; + + -d $proc_base or die "Missing '$proc_base'. Perhaps zaptel module isn't loaded?\n"; + foreach my $zfile (glob "$proc_base/*") { + $zfile =~ s:$proc_base/::; + my $span = Zaptel::Span->new($zfile); + push(@spans, $span); + } + return sort { $a->num <=> $b->num } @spans; +} + +1; |