[RADIATOR] Using Storable in a hook
Jared Watkins
JWatkins at acninc.com
Tue Jan 24 21:44:40 CST 2012
I figured out that I have to call it directly like Storable::nfreeze(\%x) but the error I was getting for other way was:
Bizarre copy of HASH in refgen at
Now.. I'm passing the value in as a bound parameter in the hook and according to a length call on the variable.. it's going in with an average length of 1450 bytes. However.. when I fetch it from the database (postgres) I'm only getting back 3 bytes.
I'm using just the attributes list out of the $p variable by $p->{'Attributes'}.
I've done binary data through DBI before (to mysql) without a problem.. so I'm not sure where it might be getting lost here.
Thanks,
Jared
On Jan 24, 2012, at 5:59 PM, Heikki Vatiainen wrote:
> On 01/24/2012 10:44 PM, Jared Watkins wrote:
>
>> I'm seeing some weird errors and behavior trying to use the freeze method from Storable. Is there a special trick to making it work in hook code?
>
> I have not used Storable myself, but if you could reply with some
> examples I can take a a look.
>
> Note that some of the data structures, such as radius requests ($p
> usually) are very large. You could see e.g. with Data::Dumper to see
> what they look like.
>
>> I saw a reference on the cpan page for special handling when used in a 'Safe' compartment.. is that what's happening here? For reference.. for development/debugging I'm attempting to serialize and store (in db field) a hash I'm creating with all the per packet name-value pairs.
>
> Hard to tell. Examples would be useful :)
>
> Thanks!
> Heikki
>
> --
> Heikki Vatiainen <hvn at open.com.au>
>
> Radiator: the most portable, flexible and configurable RADIUS server
> anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
> Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
> TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
> DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
> NetWare etc.
More information about the radiator
mailing list