Short answer. The Civil Code sets a chain of decision-makers: the person the testator appointed for that purpose; if none, the executor; and if there is no executor, the justice of the peace, the mayor, and the municipal treasurer, deciding by majority vote, subject to court approval.
What the law says
The designation of the persons who are to be considered as poor and the distribution of the property shall be made by the person appointed by the testator for the purpose; in default of such person, by the executor, and should there be no executor, by the justice of the peace, the mayor, and the municipal treasurer, who shall decide by a majority of votes all questions that may arise.
Civil Code, Article 1030 — Dispositions in Favour of the Poor. Read the full provision →
The first question: who counts as 'the poor'
Before anyone distributes anything, Article 1030 narrows what "the poor" even means in this kind of gift. Where a will benefits the poor in general, without naming particular persons or a community, the gift is deemed limited to the poor living in the testator's domicile at the time of death — unless it clearly appears the testator meant something broader. So the pool of possible recipients is not open-ended; it is anchored to a specific place unless the will itself says otherwise.
The chain of decision-makers
Article 1030 then sets out, in order, who decides which individuals within that pool actually receive the property. First in line is the person the testator appointed for that purpose — if the will named someone for this role, that person decides. If no one was appointed, the role falls to the executor of the will. If there is no executor either, the decision passes to a group: the justice of the peace, the mayor, and the municipal treasurer, who resolve any questions that arise by majority vote among themselves.
Court approval is required either way
Whichever of these decision-makers ends up designating the recipients and distributing the property, Article 1030 adds one more requirement that applies in all these cases: the approval of the court is necessary. So even the person the testator personally appointed does not have the final, unreviewable word — the designation and distribution still needs to be approved by the court, which the article originally names as the Court of First Instance, now organized as the Regional Trial Court.
The same rule applies to a defined locality
This entire process is not limited to gifts phrased as benefiting "the poor" with no geographic qualifier at all. The article specifically extends the same rule to a will that disposes of property in favor of the poor of a definite locality — the same chain of decision-makers, and the same requirement of court approval, governs that situation too, without needing any separate or additional provision to make it apply.