<div dir="ltr"><div style>Data::Dumper is truly interesting, and might be worth it if it's as elegant a solution as it sounds like it might be, since there won't be any blessed objects to worry about.</div><div><br>
</div>Data::Visitor::Callback is an idea that merits a little work; the docs aren't the clearest, but this might work.<div><br></div><div style>Using YAML/JSON isn't a bad idea, but I'm worried about the performance hit.</div>
<div style><br></div><div style>I'll try these in order and report back.</div><div style><br></div><div style>J</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 7:31 PM, benh <span dir="ltr"><<a href="mailto:ben.hengst@gmail.com" target="_blank">ben.hengst@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Another idea that I just though of would be to serialize to something<br>
like YAML or JSON and then regex and then expand again. Though I am<br>
not sure about the performance issues, would need testing.<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, Jun 14, 2013 at 6:08 PM,  <<a href="mailto:joshua@keroes.com">joshua@keroes.com</a>> wrote:<br>
> <a href="https://metacpan.org/module/Data::Visitor::Callback" target="_blank">https://metacpan.org/module/Data::Visitor::Callback</a> perhaps?<br>
><br>
> On Jun 14, 2013, at 15:28, Josh Heumann <<a href="mailto:pdx.pm@joshheumann.com">pdx.pm@joshheumann.com</a>> wrote:<br>
><br>
> Hey folks,<br>
><br>
> I'm sure this is just me having a lapse of memory, but can anyone recommend<br>
> a module for running a regular expression over a large and<br>
> arbitrarily-nested data structure?<br>
> Ideally something like this:<br>
> # %data_structure is a hash containing hashrefs, arrayrefs, strings, but no<br>
> objects.%data_structure =~ s/foo/bar/g;<br>
> ...would replace foo with bar in all strings at all levels.<br>
> J<br>
><br>
> _______________________________________________<br>
> Pdx-pm-list mailing list<br>
> <a href="mailto:Pdx-pm-list@pm.org">Pdx-pm-list@pm.org</a><br>
> <a href="http://mail.pm.org/mailman/listinfo/pdx-pm-list" target="_blank">http://mail.pm.org/mailman/listinfo/pdx-pm-list</a><br>
><br>
><br>
> _______________________________________________<br>
> Pdx-pm-list mailing list<br>
> <a href="mailto:Pdx-pm-list@pm.org">Pdx-pm-list@pm.org</a><br>
> <a href="http://mail.pm.org/mailman/listinfo/pdx-pm-list" target="_blank">http://mail.pm.org/mailman/listinfo/pdx-pm-list</a><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
benh~<br>
<br>
<a href="http://about.notbenh.info" target="_blank">http://about.notbenh.info</a><br>
<br>
Stability is not a Regression.<br>
<br>
</font></span></blockquote></div><br></div>