Implement callback as a rule:

You can now use a callback as a rule in and of itself.

    my $rules = {
        Homer => {
            Office => [
                [ 1, sub {
                    my $params = shift;

                    # is it work hours?
                    now - $params->{'work_hours'} >= 0
                        and return 1;

                    # no? fail
                    return;
                } ]
            ]
        },
    };

It can also be mixed with additional rules in the same ruleset, and,
of course, labels.

    my $rules = {
        Homer => {
            Office => [
                'can home go in the office?' =>
                [ 1,
                    # rules
                    { time_of_day => 'Monday' },
                    sub {
                        my $params = shift;

                        # is it work hours?
                        now - $params->{'work_hours'} >= 0
                            and return 1;

                        # no? fail
                        return;
                    },
                    'key_to_the_office',
                ]
            ]
        },
    };