Pre-heat the oven to gas mark 3, 325°F (160°C).
Pile all the flour on the centre of a clean work-surface, make a hole in the middle with your fist and add the sugar, butter, egg and egg yolk, baking powder, vanilla, grappa or brandy and salt. Knead everything together with your hands to make a soft dough and roll it into a ball. Remove one quarter of the dough and set it aside.
Butter an 11 inch (28 cm) shallow cake tin, dust with flour and breadcrumbs then cover with the apricot jam and crumbled amaretti. Roll out the larger piece of dough to line the base and sides of the tin. Cover it with the pears and scatter over the allspice, sultanas, pine kernels and caster sugar. Roll out the reserved dough into sausage shapes and place one round the edge of the flan. Flatten the rest to a thickness of about ½ inch (5 mm) and lay them on top to form a lattice pattern. Put the tart in the oven and bake for about 40 minutes or until cooked through and browned on top. About 10 minutes before the end of the cooking time, remove it from the oven and brush the top very generously with sweetened milk: this will keep the cake softer. Serve cold.