Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #32087] .include with an absolute path

2 views
Skip to first unread message

Matthias Huerlemann

unread,
Oct 22, 2004, 5:30:44 AM10/22/04
to bugs-bi...@rt.perl.org
# New Ticket Created by Matthias Huerlemann
# Please include the string: [perl #32087]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32087 >


Hello

This patch is not meant to repair a bug. It is rather a microscopic
feature request:
The ".include" statement does not allow absolute paths like:


.include "/home/user/folder/file.pir"


Is this behaviour wanted?
I hope you can use the file as is. It is diff'd and tested against the
snapshot: 2004-10-22 07:00.
Please tell me if I have done something terribly wrong ;-)

library.patch

Leopold Toetsch

unread,
Oct 22, 2004, 7:29:38 AM10/22/04
to perl6-i...@perl.org
Matthias Huerlemann <parrotbug...@parrotcode.org> wrote:

> Hello

> This patch is not meant to repair a bug. It is rather a microscopic
> feature request:
> The ".include" statement does not allow absolute paths like:

> .include "/home/user/folder/file.pir"

I think, if the filename looks like an absolute path, it should be used
as is. That's rather easy in that case (*file_name == '/') but not so
easy to get it right for all platforms (e.g. "c:file_name" vs
"c:\\file_name") and so on.

The relevant Perl libs should have implementations of the necessary
tweaks.

> Is this behaviour wanted?

Trying "/" . file_name looks wrong to me.

> Please tell me if I have done something terribly wrong ;-)

The patch looks fine, though ;)

Thanks,
leo

Matthias Hürlemann

unread,
Oct 22, 2004, 8:47:37 AM10/22/04
to parrotbug...@parrotcode.org
I am fully aware that an absolute path can have some negative side
effects. You can lose platform independecy - not to speak of problems
with the Win-Filesystem. I don't now how to write tests for it either.
But do you think, this could work for a start?

I promise, I will try to find more important stuff to patch in the
future. I don't want to keep you away from the stuff that really
matters.

Thanks
Matthias

-------
Matthias Hürlemann
mat...@eliza.ch
http://www.eliza.ch

0 new messages