On 10 March 2016 at 12:42, Aristotle Pagaltzis <pagalt...@gmx.de> wrote:

> * Chris Welch <welch.ch...@gmail.com> [2016-03-09 20:10]:
> > All of this brings up a quandary: there are only two ways around this
> > that I can see:
>
> There’s plenty more. E.g. you could have generate_ical_data expect one
> or several callbacks to generate those values for it, something like
>
> ​​
>     $match->generate_ical_data(
>         get_uri         => sub { $c->uri_for_action( ... ) },
>         get_description => sub { $c->maketext( ... ) },
>         # ...
>     );
> ​
>

​Oh I very much like that - I *knew* ​I had to be missing a better way of
doing it, I bow to your superior ideas, thank you very much.

Thinking about it: any way you would pass in an anonymous sub rather than
the return value from the actual methods - i.e.:

​
    $match->generate_ical_data(
        get_uri         => $c->uri_for_action( ... ) ,
        get_description => $c->maketext( ... ) ,
        # ...
    );
​


​Thanks again.​
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to