Short answer. The poor living in the testator's domicile at the time of death. Article 1030 of the Civil Code limits a testamentary gift to the poor in general, without naming particular persons or a community, to the poor living where the testator was domiciled when he died, unless a contrary intention clearly appears from the will.
What the law says
Testamentary provisions in favor of the poor in general, without designation of particular persons or of any community, shall be deemed limited to the poor living in the domicile of the testator at the time of his death, unless it should clearly appear that his intention was otherwise.
Civil Code, Article 1030 — Dispositions in Favour of the Poor. Read the full provision →
Why the gift is not left completely undefined
A gift simply to the poor might seem too vague to have any legal effect at all, since no specific beneficiary is named. Article 1030 solves that by supplying a default scope: such a provision is deemed limited to the poor living in the domicile of the testator at the time of his death. This anchors an otherwise open-ended gift to a concrete, identifiable group, namely the poor of a specific place connected to the testator, rather than leaving the disposition impossible to actually carry out.
When this default rule can be overridden
Article 1030's limitation to the testator's domicile applies unless it should clearly appear that his intention was otherwise. This means the will itself, or other evidence of the testator's intent, can point to a different scope, such as the poor of some other named locality. Absent that kind of clear indication, though, the default rule controls, and the gift is confined to the poor of wherever the testator was domiciled at the time of his death.
Who actually decides who qualifies and distributes the property
Article 1030 also answers the practical question of who identifies the actual recipients. The designation of the persons considered as poor, and the distribution of the property, is made by the person the testator appointed for that purpose. If the testator named no such person, the task falls to the executor, and if there is no executor either, to the local officials the article names, who decide by majority vote any questions that arise in the process.
The role of court approval
Article 1030 adds a check on all of this: in every one of these cases, court approval is necessary before the designation and distribution take effect. This means whoever ends up identifying the specific poor beneficiaries and distributing the property cannot finalize that process without a court signing off on it, providing oversight over how this open-ended kind of bequest is actually carried out in practice.