in reply to Re: Reading session data
in thread Reading session data

Correct me if I'm wrong, but using a YAML lib would only work whenever I use YAML for my sessions. Which is not good practice in a production env as I understand. The session should be agnostic to the format in which it is stored.

Replies are listed 'Best First'.
Re^3: Reading session data
by kcott (Archbishop) on Jul 02, 2023 at 13:01 UTC

    Your example data used YAML; I used an appropriate module to get that data into a Perl data structure.

    My point, however, was not about YAML; it was in relation to old and new syntax.

    hippo had already shown how to get a single array element:

    $session_data->{azuread}{login_info}{roles}[0]

    I showed a newer syntax for getting the entire array:

    $session_data->{azuread}{login_info}{roles}->@*

    Your post resulted in further discussion of old/new syntax. It was an interesting conversation; so, thanks for that.

    — Ken