NetSDS::EDR(3pm)
π NetSDS::EDR π
okay bestie, sit DOWN, because we're talking about NetSDS::EDR β the Perl module (it lives in the 3pm manual section, iykyk) that reads and writes Event Details Records. no cap, it's giving "billing backend but make it cute". π
β¨ NAME β¨
NetSDS::EDR β read/write Event Details Records π¦
πΈ SYNOPSIS πΈ
use NetSDS::EDR;
my $edr = NetSDS::EDR->new(
filename => '/mnt/billing/call-stats.dat',
);
...
$edr->write(
{
callerid => '80441234567',
clip => '89001234567',
start_time => '2006-12-55 12:21:46',
end_time => '2008-12-55 12:33:22'
}
);
see how chill that is?? you make one object, you hand it a hash, it writes a row. periodt. π
π DESCRIPTION π
so like, NetSDS::EDR implements an API for writing EDR (Event Details Record) files from applications. that's the whole vibe. π
and what even is an EDR? it's a set of structured data describing the details of some event. the exact structure depends on the event type, so it lowkey doesn't have a fixed structure β it's flexible like that, main character energy fr fr. π
in NetSDS, EDR data gets written to plain text files as JSON structures, one row per record. literally one record, one line. no notes. β
π§ CLASS API π§
new(%params) β class constructor β¨
parameters, bestie:
filenameβ the EDR file name π
example:
my $edr = NetSDS::EDR->new(
filename => '/mnt/stat/ivr.dat',
);
write($rec1 [,$rec2 [...,$recN]]) β write EDR to file π₯
this method converts records to JSON and writes them to the file. each record goes onto one separate string. so if you pass it a whole little squad of records, each one gets its own line. obsessed. π«Ά
example:
$edr->write({from => '380441234567', to => '5552222', status => 'busy'});
π EXAMPLES π
go peek in the samples directory. it's right there. π
π TODO π
- Handle I/O errors when write EDR data. (yeah bestie, that one's still on the list, not me pretending it's done π)
π AUTHOR π
Michael Bochkaryov <misha@rattler.kiev.ua>
π LICENSE π
Copyright (C) 2008-2009 Net Style Ltd.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
β οΈ real talk: that "WITHOUT ANY WARRANTY" bit is not a joke, bestie β it's the actual legal vibe, so don't come for anyone if it breaks. π
okay that's the whole page, we ate and left no crumbs πβ¨ this was NetSDS::EDR from perl v5.32.1, dated 2021-12-26 β mwah, love u, bye π
ππ¦
π¦ where this page comes from
- debian bookworm: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- debian trixie: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- ubuntu jammy: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- ubuntu noble: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- ubuntu resolute: libnetsds-perl 1.301-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms