You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philip M. Gollucci" <pg...@p6m7g8.com> on 2005/08/21 11:21:28 UTC

[PATCH] Apache2::Status fixes

This patch does the following:

o Set some minium version for things I'm finally seeing work.
o s/Apache2::Peek/Apache::Peek/g this package is both 1.x and 2.x series.
o moved the defined ness check for $mod_ver before the regex.
   there was at least one module that didn't have a version.
o uncomment the xref link as it works

These depends on some B::* patches that I have coming up next.
Namely B::Terse, B::TerseSize, B::Concise

Index: Status.pm
===================================================================
--- Status.pm   (revision 234145)
+++ Status.pm   (working copy)
@@ -61,12 +61,12 @@
      dumper      => ["StatusDumper",      "Data::Dumper",   0,    ],
      b           => ["",                  "B",              0,    ],
      graph       => ["StatusGraph",       "B::Graph",       0.03, ],
-    lexinfo     => ["StatusLexInfo",     "B::LexInfo",     0,    ],
+    lexinfo     => ["StatusLexInfo",     "B::LexInfo",     0.02, ],
      xref        => ["",                  "B::Xref",        0,    ],
-    terse       => ["StatusTerse",       "B::Terse",       0,    ],
-    tersesize   => ["StatusTerseSize",   "B::TerseSize",   0,    ],
-    packagesize => ["StatusPackageSize", "B::TerseSize",   0,    ],
-    peek        => ["StatusPeek",        "Apache2::Peek",   0,    ], # XXX: version?
+    terse       => ["StatusTerse",       "B::Terse",       1.03, ],
+    tersesize   => ["StatusTerseSize",   "B::TerseSize",   0.04, ],
+    packagesize => ["StatusPackageSize", "B::TerseSize",   0.04, ],
+    peek        => ["StatusPeek",        "Apache::Peek",   1.05, ],
  );

  sub has {
@@ -82,9 +82,12 @@
      # if !$opt we skip the testing for the option
      return 0 if $opt && !status_config($r, $opt);
      return 0 unless eval { require $file };
+
      my $mod_ver = $module->VERSION;
+    return 0 unless defined $mod_ver;
+
      $mod_ver =~ s/_.*//; # handle dev versions like 2.121_02
-    return 0 unless $mod_ver && $mod_ver >= $version;
+    return 0 unless $mod_ver >= $version;

      return 1;
  }
@@ -434,7 +437,7 @@
      push @retval, "Prototype: ", $proto || "none", "\n";
      push @retval, "XSUB: ",      $obj->XSUB ? "yes" : "no", "\n";
      push @retval, peek_link($r, $name, $type);
-    #push @retval, xref_link($r, $name);
+    push @retval, xref_link($r, $name);
      push @retval, b_graph_link($r, $name);
      push @retval, b_lexinfo_link($r, $name);
      push @retval, b_terse_link($r, $name);
@@ -649,7 +652,7 @@
      my($name, $type) = (split "/", $r->uri)[-2,-1];
      $type =~ s/^FUNCTION$/CODE/;
      $r->print("Peek Dump of $name $type\n\n");
-    Apache2::Peek::Dump(*{$name}{$type});
+    Apache::Peek::Dump(*{$name}{$type});
  }

  sub xref_link {


-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [PATCH] Apache2::Status fixes

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Philip M. Gollucci wrote:
> Geoffrey Young wrote:
> 
>> shouldn't there be some kind of version requirements on special
>> versions of
>> those modules, then?  or do are things broken now but visible, and the
>> patches to the B:: modules fix the brokenness?
> 
> Yes, I don't believe most of what I changed ever worked at least since RC5
> without these particulary the B::Terse stuff relying on
> Apache::Status::noh_fileline.
> 
> Also, the '-slow' option is now '-basic', for
> B::Terse(deprecated)/B::Concise(newer)
> so anything that used that doesn't work.
> 
> Thats why I set/upped the version of a lot of the B modules requirements
> in the ARRAY of HASHES.
> 
> I was thinking of do a lot of screenshots and adding them to the docs
> section for this and updating/syncing
> the mp1/mp2 sections as the documentation requests.
> 
> If it helps, I can break the patch down into sets and explain each?

nah - I, at least, am fine with whatever you're doing here, as you may be
the only active user of these tools at this point, so if what you're doing
is getting broken stuff to work I'm completely fine with it :)

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [PATCH] Apache2::Status fixes

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Geoffrey Young wrote:
> shouldn't there be some kind of version requirements on special versions of
> those modules, then?  or do are things broken now but visible, and the
> patches to the B:: modules fix the brokenness?
Yes, I don't believe most of what I changed ever worked at least since RC5
without these particulary the B::Terse stuff relying on Apache::Status::noh_fileline.

Also, the '-slow' option is now '-basic', for B::Terse(deprecated)/B::Concise(newer)
so anything that used that doesn't work.

Thats why I set/upped the version of a lot of the B modules requirements in the ARRAY of HASHES.

I was thinking of do a lot of screenshots and adding them to the docs section for this and updating/syncing
the mp1/mp2 sections as the documentation requests.

If it helps, I can break the patch down into sets and explain each?
-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [PATCH] Apache2::Status fixes

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Philip M. Gollucci wrote:
> This patch does the following:
> 
> o Set some minium version for things I'm finally seeing work.
> o s/Apache2::Peek/Apache::Peek/g this package is both 1.x and 2.x series.
> o moved the defined ness check for $mod_ver before the regex.
>   there was at least one module that didn't have a version.
> o uncomment the xref link as it works
> 
> These depends on some B::* patches that I have coming up next.
> Namely B::Terse, B::TerseSize, B::Concise

shouldn't there be some kind of version requirements on special versions of
those modules, then?  or do are things broken now but visible, and the
patches to the B:: modules fix the brokenness?

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [PATCH] Apache2::Status fixes

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Philip M. Gollucci wrote:
> This patch does the following:
> 
> o Set some minium version for things I'm finally seeing work.
 > +    tersesize   => ["StatusTerseSize",   "B::TerseSize",   0.04, ],
 > +    packagesize => ["StatusPackageSize", "B::TerseSize",   0.04, ],

Applogies, that should have been
 > +    tersesize   => ["StatusTerseSize",   "B::TerseSize",   0.05, ],
 > +    packagesize => ["StatusPackageSize", "B::TerseSize",   0.05, ],

As my changes will obviously not be in the curernt 0.04.


-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org