Skip Menu |

This queue is for tickets about the Net-NfDump CPAN distribution.

Report information
The Basics
Id: 110170
Status: resolved
Priority: 0/
Queue: Net-NfDump

People
Owner: TPODER [...] cpan.org
Requestors: alexz [...] opmantek.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.20



Subject: Field order+names hard to discover with Fields '*'
Date: Tue, 08 Dec 2015 15:56:07 +1000
To: bug-Net-NfDump [...] rt.cpan.org
From: Alexander Zangerl <alexz [...] opmantek.com>
net::nfdump works very nicely, but if you don't pass a field list in to get all of them, then it is pretty hard to figure out /what/ fields you do actually get back. the lookup tables net::nfdump::fields don't help, because the constructor uses "values" on a hash to create the internal field list - hence it's in different order every time you start things up. it would be great if there was an official (readonly) accessor to $self->{fields_txt}, so that one can ask the instance for the current list of field names and current ordering. regards az -- Alexander Zangerl email: alexz@opmantek.com skype: alex.zangerl mobile: +61 415 482 341 web: https://community.opmantek.com/
Hi, thanks for reporting the issue. I was thinking about similar mechanism that is used in DBI: foreach $colno (0..$flow->{NUM_OF_FIELDS}-1) { print $flow->{NAME}->[$colno]."\t"; } The arrayref $flow->{NAME} will always return the actual list of fields as it was specified in query, so for * it will contain list of all fields in same order as the fields will be returned by fetchrow_array or fetchrow_arrayref. Would it work for you? Tomas On Tue Dec 08 00:56:22 2015, alexz@opmantek.com wrote: Show quoted text
> net::nfdump works very nicely, but if you don't pass a field list in to get > all of them, then it is pretty hard to figure out /what/ fields you do > actually get back. > > the lookup tables net::nfdump::fields don't help, because the constructor > uses "values" on a hash to create the internal field list - hence it's in > different order every time you start things up. > > it would be great if there was an official (readonly) accessor > to $self->{fields_txt}, so that one can ask the instance for the current > list of field names and current ordering. > > regards > az > >
Subject: Re: [rt.cpan.org #110170] Field order+names hard to discover with Fields '*'
Date: Thu, 10 Dec 2015 09:22:12 +1000
To: bug-Net-NfDump [...] rt.cpan.org
From: Alexander Zangerl <alexz [...] opmantek.com>
On Wed, 09 Dec 2015 04:35:54 -0500, "Tomas Podermanski via RT" writes: Show quoted text
>The arrayref $flow->{NAME} will always return the actual list of fields >as it w as specified in query, so for * it will contain list of all >fields in same orde r as the fields will be returned by fetchrow_array >or fetchrow_arrayref. > >Would it work for you?
yes, that would work very well. thanks for your fast response! regards az -- Alexander Zangerl email: alexz@opmantek.com skype: alex.zangerl mobile: +61 415 482 341 web: https://community.opmantek.com/
Hi, the feature is implemented in the github code https://github.com/VUTBR/nf-tools/tree/master/libnf/perl/Net-NfDump. It will be part of the Net::NfDump package in next release (i expect aprox. in one month). Thanks for you suggestion Tomas On Wed Dec 09 18:22:29 2015, alexz@opmantek.com wrote: Show quoted text
> On Wed, 09 Dec 2015 04:35:54 -0500, "Tomas Podermanski via RT" writes:
> >The arrayref $flow->{NAME} will always return the actual list of fields > >as it w as specified in query, so for * it will contain list of all > >fields in same orde r as the fields will be returned by fetchrow_array > >or fetchrow_arrayref. > > > >Would it work for you?
> > yes, that would work very well. > > thanks for your fast response! > > regards > az > >
Subject: Re: [rt.cpan.org #110170] Field order+names hard to discover with Fields '*'
Date: Thu, 07 Jan 2016 09:12:17 +1000
To: bug-Net-NfDump [...] rt.cpan.org
From: Alexander Zangerl <alexz [...] opmantek.com>
On Wed, 06 Jan 2016 08:18:02 -0500, "Tomas Podermanski via RT" writes: Show quoted text
> the feature is implemented in the github code https://github.com/VUTBR/nf-tool >s/tree/master/libnf/perl/Net-NfDump. It will be part of the Net::NfDump package > in next release (i expect aprox. in one month).
great, thank you! regards az -- Alexander Zangerl email: alexz@opmantek.com skype: alex.zangerl mobile: +61 415 482 341 web: https://community.opmantek.com/