Re: WWW:Mechanize and Proxies

2006-03-21 Thread David TV
Ok, that worked! Thanks a lot!

On 3/22/06, DePriest, Jason R. [EMAIL PROTECTED] wrote:
 David,

 You need to change your environment variables for the operating system.

 If you wanted to do it from within the script you could do something like 
 this:
 $ENV{HTTP_PROXY} = 'http://username:[EMAIL PROTECTED]:8080/'';

 On 3/9/06, David TV  wrote:
  Something keeps on failing... Here's the code:
 
  use strict;
  use Data::Dumper;
  use WWW::Mechanize;
  use File::Basename;
 
  my $http_proxy = 'http://55.6.1.145:8080/';
  my $http_proxy_pass = 'my_passwd';
  my $http_proxy_user = 'username';
 
  my $m = WWW::Mechanize - new or die ...ugly...;
 
  $m - get (http://www.despair.com/indem.html;) or die ...ugly...;
 
  my @top_links = @{$m - links};
 
  print Data::Dumper - Dump ( [\$m], [qw(\$m)] );
 
  This dumps the html page returned from the proxy saying that it needs
  authentication (despite I populated both http username and password):
  ot says (in a short way): Unable to complete request:Access denied
  due to authentication failure.
 
  - David
 



--
Un saludo,

#
   David TV
  E-Mail: [EMAIL PROTECTED]
#

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


WWW:Mechanize and Proxies

2006-03-09 Thread David TV
Hello there!

Is there any way to force Mechanize to use/go through a proxy??

Thanks in advance!!

- David

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: WWW:Mechanize and Proxies

2006-03-09 Thread David TV
Thanks a lot!!!

On 3/9/06, willem [EMAIL PROTECTED] wrote:
 David TV wrote:

 Hello there!
 
 Is there any way to force Mechanize to use/go through a proxy??
 
 Thanks in advance!!
 
 
 like with LWP::UserAgent.

 it automatically calls $ua-env_proxy

 ... so ( from useragent docs )

 Load proxy settings from *_proxy environment variables.  You might
 specify proxies like this (sh-syntax):

   gopher_proxy=http://proxy.my.place/
   wais_proxy=http://proxy.my.place/
   no_proxy=localhost,my.domain
   export gopher_proxy wais_proxy no_proxy

 willem




--
Un saludo,

#
   David TV
  E-Mail: [EMAIL PROTECTED]
#

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: WWW:Mechanize and Proxies

2006-03-09 Thread David TV
Something keeps on failing... Here's the code:

use strict;
use Data::Dumper;
use WWW::Mechanize;
use File::Basename;

my $http_proxy = 'http://55.6.1.145:8080/';
my $http_proxy_pass = 'my_passwd';
my $http_proxy_user = 'username';

my $m = WWW::Mechanize - new or die ...ugly...;

$m - get (http://www.despair.com/indem.html;) or die ...ugly...;

my @top_links = @{$m - links};

print Data::Dumper - Dump ( [\$m], [qw(\$m)] );

This dumps the html page returned from the proxy saying that it needs
authentication (despite I populated both http username and password):
ot says (in a short way): Unable to complete request:Access denied
due to authentication failure.

- David

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: IP address calculation

2005-10-25 Thread David TV
Hello, Markus.

Check out this little utility I found some time ago over the
Internet: ipcalc.pl

Use the Google search to look for ipcalc.pl, and you'll find
something VERY interesting ;) in the first lines.

Hope it helps!

On 10/25/05, Markus [EMAIL PROTECTED] wrote:



 Hi all,



 I get IP network definition in format like this one 10.10.16.0/23 and need
 to calculate after counter additional networks.



 In the first step I need to validate the correctness of delivered IP network
 definition.

 In the second step increment in valid steps additional networks.



 In the moment I play with decimal numbers, but it is complex and looks not
 so professional style to program.

 Has someone an idea how to do it in another strategy like hexadecimal?



 Best regards,



 Markus
 ___
 Perl-Win32-Users mailing list
 Perl-Win32-Users@listserv.ActiveState.com
 To unsubscribe:
 http://listserv.ActiveState.com/mailman/mysubs





--
Un saludo,

#
   David TV
  E-Mail: [EMAIL PROTECTED]
#

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl Tk question

2005-06-01 Thread David TV
Just add:

$top-update

any place inside the prg procedure.

On Wed, 1 Jun 2005 08:06:42 UT, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi All!
 In the following snippet:
 
 use strict;
 use Tk;
 require Tk::LabFrame;
 my $top = new MainWindow;
 my $bar=$top-LabFrame(-label = 'buttons bar');
 $bar-pack;
 my $exi=$bar-Button(-command=\exi,-text='exit');
 $exi-pack(-side='left');
 my $prg=$bar-Button(-command=\prg,-text='prg');
 $prg-pack(-side='left');
 my $fr=$top-LabFrame();
 $fr-configure(-height='5',-width=30);
 $fr-pack(-fill='none');
 my $text0=$fr-Text();
 $text0-configure(-height='10',-width=20);
 $text0-pack(-side='top',-fill='none');
 MainLoop;
 sub exi{
 $top-destroy;
 }
 sub prg{
 for (my $i=0;$i20;$i++){
 $text0-delete('0.0','end');
 $text0-insert('end',$i\n);
 sleep 1;
 }
 }
 
 When executing this snippet
 I see in text0 only the last $i /in for cycle/
 What I  must add to prg code
 in order to see all cosequtive values of $i ?
 ___
 Perl-Win32-Users mailing list
 Perl-Win32-Users@listserv.ActiveState.com
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 


-- 
Un saludo,

#
   David TV
  E-Mail: [EMAIL PROTECTED] 
#

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs