Cut the pastry into 4 pieces. Place a spoonful of custard onto each pastry square then top with pear halves. Brush the edge of the pastry with egg wash then fold over the pastry to close in the filling. Seal by pressing with the fork then brush the top with more egg wash. Sprinkle with castor sugar then place on a baking tray. Bake in a 200˚C oven for about 10 minutes or until pastry is golden brown and crispy.