Commit | Line | Data |
351625bd |
1 | |
2 | use strict; |
3 | package Pod::Simple::TiedOutFH; |
4 | use Symbol ('gensym'); |
5 | use Carp (); |
6 | |
7 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
8 | |
9 | sub handle_on { # some horrible frightening things are encapsulated in here |
10 | my $class = shift; |
11 | $class = ref($class) || $class; |
12 | |
13 | Carp::croak "Usage: ${class}->handle_on(\$somescalar)" unless @_; |
14 | |
15 | my $x = (defined($_[0]) and ref($_[0])) |
16 | ? $_[0] |
17 | : ( \( $_[0] ) )[0] |
18 | ; |
19 | $$x = '' unless defined $$x; |
20 | |
21 | #Pod::Simple::DEBUG and print "New $class handle on $x = \"$$x\"\n"; |
22 | |
23 | my $new = gensym(); |
24 | tie *$new, $class, $x; |
25 | return $new; |
26 | } |
27 | |
28 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
29 | |
30 | sub TIEHANDLE { # Ties to just a scalar ref |
31 | my($class, $scalar_ref) = @_; |
32 | $$scalar_ref = '' unless defined $$scalar_ref; |
33 | return bless \$scalar_ref, ref($class) || $class; |
34 | } |
35 | |
36 | sub PRINT { |
37 | my $it = shift; |
38 | foreach my $x (@_) { $$$it .= $x } |
39 | |
40 | #Pod::Simple::DEBUG > 10 and print " appended to $$it = \"$$$it\"\n"; |
41 | |
42 | return 1; |
43 | } |
44 | |
45 | sub FETCH { |
46 | return ${$_[0]}; |
47 | } |
48 | |
49 | sub PRINTF { |
50 | my $it = shift; |
51 | my $format = shift; |
52 | $$$it .= sprintf $format, @_; |
53 | return 1; |
54 | } |
55 | |
56 | sub FILENO { ${ $_[0] } + 100 } # just to produce SOME number |
57 | |
58 | sub CLOSE { 1 } |
59 | |
60 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
61 | 1; |
62 | __END__ |
63 | |
64 | Chole |
65 | |
66 | * 1 large red onion |
67 | * 2 tomatillos |
68 | * 4 or 5 roma tomatoes (optionally with the pulp discarded) |
69 | * 1 tablespoons chopped ginger root (or more, to taste) |
70 | * 2 tablespoons canola oil (or vegetable oil) |
71 | |
72 | * 1 tablespoon garam masala |
73 | * 1/2 teaspoon red chili powder, or to taste |
74 | * Salt, to taste (probably quite a bit) |
75 | * 2 (15-ounce) cans chick peas or garbanzo beans, drained and rinsed |
76 | * juice of one smallish lime |
77 | * a dash of balsamic vinegar (to taste) |
78 | * cooked rice, preferably long-grain white rice (whether plain, |
79 | basmati rice, jasmine rice, or even a mild pilaf) |
80 | |
81 | In a blender or food processor, puree the onions, tomatoes, tomatillos, |
82 | and ginger root. You can even do it with a Braun hand "mixer", if you |
83 | chop things finer to start with, and work at it. |
84 | |
85 | In a saucepan set over moderate heat, warm the oil until hot. |
86 | |
87 | Add the puree and the balsamic vinegar, and cook, stirring occasionally, |
88 | for 20 to 40 minutes. (Cooking it longer will make it sweeter.) |
89 | |
90 | Add the Garam Masala, chili powder, and cook, stirring occasionally, for |
91 | 5 minutes. |
92 | |
93 | Add the salt and chick peas and cook, stirring, until heated through. |
94 | |
95 | Stir in the lime juice, and optionally one or two teaspoons of tahini. |
96 | You can let it simmer longer, depending on how much softer you want the |
97 | garbanzos to get. |
98 | |
99 | Serve over rice, like a curry. |
100 | |
101 | Yields 5 to 7 servings. |
102 | |
103 | |