Preheat the oven to 180C. Grease an ovenproof dish with butter.
In a large bowl, rub the butter into the flour using your fingertips, until the mixture resembles breadcrumbs. Add the sugar, mix well, then set aside.
To make the filling, place the whole pears in a pan, cover with water and add 1/3 of the sugar. Bring to the boil, then reduce the heat to a simmer and cook for 10–12 minutes, or until the pears are tender. Drain well and set the pears aside to cool. Remove the pear cores and chop the flesh.
Spoon one-quarter of the pears in an even layer on the bottom of the prepared ovenproof dish. Scatter one-quarter of the blackberries over the pears and then sprinkle over 2 tablespoons of the remaining caster sugar. Repeat the layering process until all the pears, brambles and sugar have been used.
Sprinkle over the topping and bake for 20–25 minutes, or until golden-brown and bubbling.