Preheat your oven to 180C.
In a mixing bowl, cream together softened butter, sugar and grated gula melaka until the gula melaka is well dissolved and the mixture is fluffy.
Crack in eggs, one at a time. Then, drizzle in pandan extract. Make sure all the ingredients are in room temperature to prevent the mixture from curding.
Fold in half of the dry ingredients which consist of plain flour and baking powder.
Then, slowly drizzle in milk while the mixer is running. Fold in the rest of the dry ingredients and mix until it is well-combined. Stop mixing once there are no visible flour pockets.
Transfer into a 7-inch square pan that greased and lined with parchment paper.
Bake it in the oven for about 55 minutes to an hour.
Let it cool for awhile and invert onto a rack to cool completely.
Slice accordingly to your preference and serve. The cake can store well in room temperature for up to 5 days, or a week in the fridge.