[Pdx-pm] module recommendation: regex over data structure

benh ben.hengst at gmail.com
Fri Jun 14 19:31:41 PDT 2013


Another idea that I just though of would be to serialize to something
like YAML or JSON and then regex and then expand again. Though I am
not sure about the performance issues, would need testing.

On Fri, Jun 14, 2013 at 6:08 PM,  <joshua at keroes.com> wrote:
> https://metacpan.org/module/Data::Visitor::Callback perhaps?
>
> On Jun 14, 2013, at 15:28, Josh Heumann <pdx.pm at joshheumann.com> wrote:
>
> Hey folks,
>
> I'm sure this is just me having a lapse of memory, but can anyone recommend
> a module for running a regular expression over a large and
> arbitrarily-nested data structure?
> Ideally something like this:
> # %data_structure is a hash containing hashrefs, arrayrefs, strings, but no
> objects.%data_structure =~ s/foo/bar/g;
> ...would replace foo with bar in all strings at all levels.
> J
>
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list
>
>
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list



-- 
benh~

http://about.notbenh.info

Stability is not a Regression.


More information about the Pdx-pm-list mailing list