[PATCH] do/require don't treat '.\foo' or '..\foo' as "absolute paths" on Windows.

Christoph Lamprecht asked me to review and apply this patch.
The patch looks correct to me.

I've adapted his patches from the following bug entry to blead:

    http://rt.perl.org/rt3/Public/Bug/Display.html?id=63492

The patch with comprehensive commit message can be merged from github:

  git://github.com/jandubois/perl.git (branch:christoph)

The branch contains only a single checkin:

  http://github.com/jandubois/perl/commit/8096b6bf076492a1208bc637aed253722bbb76f6

Dave: You may want to apply the change from the bug report directly
as pp_ctl.c has changed due to the removal of MACOS_TRADITIONAL.

Graham: You can close the following Scalar-List-Utils bug as a duplicate
of the core Perl bug:

    http://rt.cpan.org/Public/Bug/Display.html?id=25430

See details of the commit message why it is not triggered during core Perl
builds on Windows.

Cheers,
-Jan

0
jand
5/11/2009 9:18:20 PM
perl.perl5.porters 48287 articles. 1 followers. Follow

4 Replies
634 Views

Similar Articles

[PageSpeed] 59

On May 11, 2009, at 4:18 PM, Jan Dubois wrote:
> Graham: You can close the following Scalar-List-Utils bug as a  
> duplicate
> of the core Perl bug:
>
>    http://rt.cpan.org/Public/Bug/Display.html?id=25430
>
> See details of the commit message why it is not triggered during  
> core Perl
> builds on Windows.

There is actually a fix going into the next Scalar-List-Utils release  
for the
same issue. You can see the path from Ricardo Signes here

http://github.com/gbarr/Scalar-List-Utils/commit/de58a664e4540d283a793bc43dd00d48807367b7

Graham.

0
gbarr
5/11/2009 10:22:18 PM
On Mon, 11 May 2009, Graham Barr wrote:
> On May 11, 2009, at 4:18 PM, Jan Dubois wrote:
> > Graham: You can close the following Scalar-List-Utils bug as a
> > duplicate of the core Perl bug:
> >
> >    http://rt.cpan.org/Public/Bug/Display.html?id=25430
> >
> > See details of the commit message why it is not triggered during
> > core Perl builds on Windows.
>
> There is actually a fix going into the next Scalar-List-Utils release
> for the same issue. You can see the path from Ricardo Signes here
>
> http://github.com/gbarr/Scalar-List-Utils/commit/de58a664e4540d283a793bc43dd00d48807367b7

Thanks, that will be good for older versions of Perl that don't have
the core fix.

On a related note, I also filed a bug against File::Spec::Win32 because
catfile('.', 'foo') no longer returns '.\foo' but just 'foo' (it always
returns a fully canonicalized path).

    https://rt.cpan.org/Ticket/Display.html?id=45972

This is not relevant for t/p_tainted.t because it is always invoked
from outside its own directory, but other programs trying to do the

    require catfile('.', 'foo');

mechanism would still be affected even after the core fix to support
'.\foo' on Windows.

Cheers,
-Jan

0
jand
5/11/2009 10:30:17 PM
On Mon, May 11, 2009 at 02:18:20PM -0700, Jan Dubois wrote:
> I've adapted his patches from the following bug entry to blead:
> 
>     http://rt.perl.org/rt3/Public/Bug/Display.html?id=63492
> 
> The patch with comprehensive commit message can be merged from github:
> 
>   git://github.com/jandubois/perl.git (branch:christoph)
> 
> The branch contains only a single checkin:
> 
>   http://github.com/jandubois/perl/commit/8096b6bf076492a1208bc637aed253722bbb76f6
> 
> Dave: You may want to apply the change from the bug report directly
> as pp_ctl.c has changed due to the removal of MACOS_TRADITIONAL.

Okay thanks. One thing. The original patch had '#ifdef WIN32',
while your bleed version only had '#if WIN32'. Will this make any
difference?

-- 
Please note that ash-trays are provided for the use of smokers,
whereas the floor is provided for the use of all patrons.
    -- Bill Royston
0
davem
5/14/2009 1:00:02 PM
On Thu, 14 May 2009, Dave Mitchell wrote:
> On Mon, May 11, 2009 at 02:18:20PM -0700, Jan Dubois wrote:
> > The branch contains only a single checkin:
> >
> >   http://github.com/jandubois/perl/commit/8096b6bf076492a1208bc637aed253722bbb76f6

I've already applied this to blead myself yesterday.

> > Dave: You may want to apply the change from the bug report directly
> > as pp_ctl.c has changed due to the removal of MACOS_TRADITIONAL.
>
> Okay thanks. One thing. The original patch had '#ifdef WIN32', while
> your bleed version only had '#if WIN32'. Will this make any
> difference?

It won't because WIN32 is defined as '1' when it is defined, but I'll
change it to #ifdef anyways because that is the common way it is being
tested.  Thanks for noticing!

Cheers,
-Jan

0
jand
5/14/2009 4:30:59 PM
Reply:

Similar Artilces:

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

'do' won't 'do' if '/'
Greetings to All from Au, Have a NetWare Perl 5.8.4 and wanted to tweak File\Spec\NW.pm to try and standardise on '/' separators. If I run a test script (t/uni/lower.t) with an unmodified NW.pm, it calls t/uni/case.pl, that, in case.pl, (when the path separators are '\'), the $file is '..\lib\unicore\To\Lower.pl' and the following code portion works, with $simple getting a returned table: sub casetest { my ($base, $spec, $func) = @_; my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", &qu...

[DOC PATCH pod/perlapi.pod 5.5.64] Change 'See C<Foo>' to 'See L<"Foo">'
perlapi.pod has lots of "See also C<Move>" and "See C<warn>" which would probably be better written as "See also L<"Move">" and "See L<"warn">" as they're all =item's. However, this touches on the same issue as the whole L<"qr//"> discussion. L<"foo"> is supposed to indicate that "foo" is a section in the current man page, not an item. As far as I can see, there's no way to indicate a link to an item in the current man page, only in other man page...

"chdir 't' if -d 't'" is evil?
Hi, I'm working on a release of PathTools, including File::Spec and Cwd. I've been told (though I never quite grokked it) to put the following code in the test scripts: BEGIN { chdir 't' if -d 't'; if ($ENV{PERL_CORE}) { @INC = '../lib'; } } use Cwd; However, I've just realized that this messes up @INC, because the Cwd.pm we need to test is in blib/lib/, which is added to the path by -Mblib, but it won't be found if we chdir('t'). I would really like to remove that whole block and make Tes...

Give access to non virtual folder through configuration entry? ERROR: <location> path attribute must be a relative virtual path. It cannot contain any of '?' ':' '\' '*' '"' '<' '>' or '|'.
I have a webpage running under a virtual directory that is mapped to d:/webapplication that produces an excel spreadsheet, the page calls a library object that generates a report and places it in a folder d:/attachments. This folder is not in the virtual directory. When I access the webpage i click a button and it attemps to return the created spreadsheet as a mim content type application/vnd.ms-excel. However i getting redirected back to the login page of the application. Ive also noticed that the excel spreadsheet has not even been created at this location. So assuming this...

'''
Name: L Lachowsky Email: e2brutus_10atyahoodotcom Product: Firefox Summary: ''' Comments: why duddn this surprise me... I change default server from IE to Mozilla, and then i get error messages. well, shud I decide to not get on my computer with Mozilla..or shud I risk security breeches with IE....hmmm at least i can get on the internet with IE Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this fee...

'100' is an unexpected token. The expected token is '"' or '''.
Dear all,  I have a web form which will call a report viewer and show the report. The report works fine under report server. When call from aspx, it show the below error. Do you know WHY? '100' is an unexpected token. The expected token is '"' or '''. Line 20, position 77. hi rchiu5hk, select rdl/rdlc file in .net IDE and right click then open with xml editor option and then copy the content and then paste it here. so that it may give some better idea on the issue."Mark as Answer" -- on the post that helps youRKChaudary I think ...

Steve Jobs: Google's 'Don't Be Evil' motto is "bullshit"
Keeping in tradition with what happened after the release of the original iPhone, Steve Jobs held a meeting at the Town Hall in Cupertino following the release of the iPad, in order for employees to ask questions about the company and the new device. There has been much debate over the lack of Flash on the iPad, so as you'd expect, that was a strong talking point during the meeting, in addition to some less positive words about Apple's current ally, Google . http://www.neowin.net/news/steve-jobs-google039s-039don039t-be-evil039-motto-is-quotbullshitquot -- "If U kn...

Pod::Html should not convert "foo" in ``foo'' [PATCH]
Pod::Html has the misfeature that it converts double-quotes into left/right double-single-quotes. That is "foo" in the POD comes out as ``foo'' in the HTML. This just looks plain ugly in most modern fonts. This patch eliminate this ``feature''. Objections? Regards, Gisle ==== //depot/perl/lib/Pod/Html.pm#82 - /home/gisle/perl/blead/lib/Pod/Html.pm ==== Index: perl/lib/Pod/Html.pm --- perl/lib/Pod/Html.pm.~1~ Wed May 24 23:03:20 2006 +++ perl/lib/Pod/Html.pm Wed May 24 23:03:20 2006 @@ -267,7 +267,6 @@ my %Local_Items; my $Is83; -my $PTQuote; ...

Cast from type ''''DBNull'''' to type ''''String'''' is not valid.
How do I avoid getting this error: Cast from type ''''DBNull'''' to type ''''String'''' is not valid. I am trying to get values from the database into a form for updating using a Datareader, SQL is set to allow nulls for certain fields as they are not required but the only way I can get the form to display is by adding a space in SQL. Is there another way around this? Check if it is equal to DBNull.Value first and if it is, don't do the cast.Stanley Tan theSpoke Blog Where in the code does it need to go? I am using the following and it's the profile that isn't always requi...

table_info('','','','%') cannot return any types
I was recently confirming table_info special cases and discovered the case for getting table_types cannot work. table_info('','','','%') should return a list of table types but it returns a list of empty strings instead: my @types = $h->tables('', '', '', '%'); print "all types:\n", join("xxx\n", @types), "\n"; # should output something like: # "dbo" # "INFORMATION_SCHEMA" # "sys" # and actually outputs: xxx xxx It seems to be down to the following ...

The type 'foo' exists in both 'one place' and 'another'
I had this error on my local development machine: Compiler Error Message: CS0433: The type 'ASP.clientredirector_ascx' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\sb2\4d76034e\bec2c8d0\App_Web_clientredirector.ascx.cdcab7d2.zmdrab5k.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\sb2\4d76034e\bec2c8d0\App_Web_axhgbqrn.dll' I updated from an earlier release to the 5/8 release of WAP and did a "Convert to Web Application" on my project again, deleted the ASP.NET temp files on my local machine and double-checked that th...

Why Response.Write("<script>window.open("newWind.aspx','report','');</script>") not working?
I need to open a new web browser of url=newWind.aspx and tried the code below; Response.Write("<script>window.open('newWind.aspx','report','');</script>")However nothing happens, what can I do to make it work? Try RegisterClientScriptBlock("OpenWin","<script language=javascript>window.open('newWind.aspx','report','');</script>")I think that is the name of it...Also look at RegisterStartupScriptBlock (I think)MajorCats Thanks. But, it was same difference. Is there anything that blocks the new browser from showing up in the setting of IE or system?   &nbs...

Web resources about - [PATCH] do/require don't treat '.\foo' or '..\foo' as "absolute paths" on Windows. - perl.perl5.porters

Resources last updated: 12/28/2015 6:44:58 PM