Heat the oil in a frying pan, add the onions and fry very gently for about 20 minutes until soft and golden. Stir in the chopped oregano and leave to cool.
Roll out the pastry on a lightly floured surface to a 65 x 30 cm (25½ x 12 inch) rectangle. Cut out 8 rounds by cutting around a 14 cm (5½ inch) bowl. Fold the edge of each pastry round over to form a thin rim, pressing the edge firmly down into the base to hold it in place.
Place on a large lightly oiled baking sheet and brush the edges with beaten egg. Stir the olives and a little pepper into the onion mixture and spread over the pastry bases. Halve the anchovies lengthways and then widthways, then arrange over the tops. Bake in a preheated oven, 200°C (400°F), Gas Mark 6, for 15 minutes until risen and golden. Serve warm or cold, scattered with oregano leaves.